[project]
name = "backend"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"base58>=2.1.1",
"django-cors-headers>=4.7.0",
"django-redis>=5.4.0",
"django-rest-framework>=0.1.0",
"djangorestframework-camel-case>=1.4.2",
"djangorestframework-simplejwt[crypto]>=5.5.0",
"drf-spectacular>=0.28.0",
"drf-standardized-errors[openapi]>=0.14.1",
"eth-account>=0.13.7",
"ipfshttpclient>=0.7.0",
"psycopg2-binary>=2.9.10",
"pydantic>=2.11.3",
"pyshen",
"pyTelegramBotAPI>=4.24.0",
"returns[compatible-mypy]>=0.25.0",
"tenacity>=9.1.2",
"web3>=7.10.0",
]
[dependency-groups]
dev = [
"datamodel-code-generator>=0.30.1",
"django-stubs[compatible-mypy]>=5.2.0",
"djangorestframework-stubs[compatible-mypy]>=3.16.0",
"mypy>=1.15.0",
"pytest>=8.3.5",
"pytest-django>=4.11.1",
"pytest-print>=1.1.0",
"ruff>=0.11.7",
]
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"C90", # maccabe
"DTZ", # flake8-atetimez
"E", # pycodestyle
"ERA", # flake8-eradicate
"EXE", # flake8-executable
"F", # pyflakes
"FLY", # pyflint
"FURB", # refurb
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"N", # pep8-naming
"PERF", # perflint
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # ruff
"S", # flake8-bandit
"SIM", # flake8-simpify
"SLF", # flake8-self
"SLOT", # flake8-slots
"T100", # flake8-debugger
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle
"YTT", # flake8-2020
"E", # pycodestyle
"F", # Pyflakes
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"I", # isort
]
ignore = [
"D100", # Missing docsdting in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D107", # Missing docstring in `__init__`
"PLR0913", # Too many arguments in function definition
"S101", # Use of `assert` detected
"A005", # Module shadows a Python standard-library module
"PT013", # pytest import consistency
"TRY003", # I want easy way to raise exceptions
"PLR0912",
"PLR0915",
"PLR2004",
"C901",
]
exclude = ["**/migrations/*.py"]
external = [ "WPS" ]
allowed-confusables = ["а", "А", "б", "Б", "в", "В", "г", "Г", "е", "Е", "з", "З", "и", "И", "к", "К", "м", "М", "н", "Н", "о", "О", "р", "Р", "с", "С", "у", "У", "ф", "Ф", "х", "Х"]
[tool.mypy]
# The mypy configurations: http://bit.ly/2zEl9WI
allow_redefinition = true
strict = true
local_partial_types = true
warn_unreachable = true
exclude = ["geodata_scripts/"]
plugins = [
"mypy_django_plugin.main",
"mypy_drf_plugin.main",
"returns.contrib.mypy.returns_plugin"
]
enable_error_code = [
"truthy-bool",
"truthy-iterable",
"redundant-expr",
"unused-awaitable",
"possibly-undefined",
"redundant-self",
"unimported-reveal",
"deprecated",
]
disallow_untyped_decorators = false
untyped_calls_exclude = [
"telebot.types.InlineKeyboardMarkup",
"telebot.TeleBot.callback_query_handler",
"telebot.custom_filters.StateFilter"
]
tool.mypy.overrides
module = ["ipfshttpclient.*"]
follow_untyped_imports = true
[tool.django-stubs]
django_settings_module = "cyber_valley.settings"
[tool.uv.sources]
pyshen = { git = "https://github.com/ai-shift/pyshen", rev = "c869ba2676a89dc05ff8a32a829d59636031666c" }
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "cyber_valley.settings"
log_cli = false
log_cli_level = "WARNING"
log_level = "WARNING"
filterwarnings = [
"ignore::DeprecationWarning",
]
[tool.pytest.ini_options.logging]
disable_loggers = [
"web3.providers.HTTPProvider",
"web3.providers.rpc",
]