Commit Graph

18 Commits

Author SHA1 Message Date
Fringg 04562fd7e7 fix: кнопка «Назад» в тарифах ведёт в админ панель, а не в настройки
Тарифы доступны напрямую из главного меню админки, но кнопка назад
вела в подменю настроек. Исправлено во всех 4 местах.
2026-03-06 04:23:05 +03:00
Fringg 1f0fef114b refactor: complete structlog migration with contextvars, kwargs, and logging hardening
- Add ContextVarsMiddleware for automatic user_id/chat_id/username binding
  via structlog contextvars (aiogram) and http_method/http_path (FastAPI)
- Use bound_contextvars() context manager instead of clear_contextvars()
  to safely restore previous state instead of wiping all context
- Register ContextVarsMiddleware as outermost middleware (before GlobalError)
  so all error logs include user context
- Replace structlog.get_logger() with structlog.get_logger(__name__) across
  270 calls in 265 files for meaningful logger names
- Switch wrapper_class from BoundLogger to make_filtering_bound_logger()
  for pre-processor level filtering (performance optimization)
- Migrate 1411 %-style positional arg logger calls to structlog kwargs
  style across 161 files via AST script
- Migrate log_rotation_service.py from stdlib logging to structlog
- Add payment module prefixes to TelegramNotifierProcessor.IGNORED_LOGGER_PREFIXES
  and ExcludePaymentFilter.PAYMENT_MODULES to prevent payment data leaking
  to Telegram notifications and general log files
- Fix LoggingMiddleware: add from_user null-safety for channel posts,
  switch time.time() to time.monotonic() for duration measurement
- Remove duplicate logger assignments in purchase.py, config.py,
  inline.py, and admin/payments.py
2026-02-16 09:18:12 +03:00
Egor 078eebfbb1 Update tariffs.py 2026-02-02 03:37:21 +03:00
c0mrade 9a2aea038a chore: add uv package manager and ruff linter configuration
- Add pyproject.toml with uv and ruff configuration
- Pin Python version to 3.13 via .python-version
- Add Makefile commands: lint, format, fix
- Apply ruff formatting to entire codebase
- Remove unused imports (base64 in yookassa/simple_subscription)
- Update .gitignore for new config files
2026-01-24 17:45:27 +03:00
Egor b088328439 Update tariffs.py 2026-01-16 08:36:08 +03:00
Egor 1337339d23 Update tariffs.py 2026-01-16 06:03:32 +03:00
Egor 24666dd155 Update tariffs.py 2026-01-12 15:48:20 +03:00
Egor 785eabaa47 Update tariffs.py 2026-01-12 15:26:20 +03:00
Egor 3656f0181c Update tariffs.py 2026-01-11 02:59:48 +03:00
Egor 69f4fd2b2a Update tariffs.py 2026-01-10 20:32:57 +03:00
Egor 9690436b9f Update tariffs.py 2026-01-07 03:47:28 +03:00
Egor fdc382f309 Update tariffs.py 2026-01-07 03:31:17 +03:00
Egor 60a38d3ea6 Add files via upload 2026-01-07 03:18:46 +03:00
Egor 0fac84aa7d Update tariffs.py 2026-01-07 03:05:31 +03:00
Egor fbb7d6c4ab Update tariffs.py 2026-01-07 02:45:42 +03:00
Egor 0b677e4205 Update tariffs.py 2026-01-07 02:35:27 +03:00
Egor 71dac493d8 Update tariffs.py 2026-01-07 02:29:37 +03:00
Egor a981bf2ae0 Add files via upload 2026-01-07 02:15:16 +03:00