[tool.poetry] name = "sqlalchemy_study_project" version = "2.0.7" description = "for study sqlalchemy async models" authors = ["Dmitry Afanasyev "] [build-system] requires = ["poetry-core>=1.6.1"] build-backend = "poetry.core.masonry.api" [tool.poetry.dependencies] python = "^3.11" sqlalchemy = {version = "^2.0", extras=["mypy"]} pydantic-settings = "^2.0.3" pydantic = {version = "^2.4", extras = ["email"]} factory-boy = "^3.3" Faker = "^19" loguru = "^0.7" alembic = "^1.12" python-dotenv = "^1.0" asyncpg = "^0.28" asyncmy = "^0.2.8" PyMySQL = "^1.1" cryptography = "^41.0" psycopg2-binary = "^2.9" [tool.poetry.dev-dependencies] ipython = "^8.17" safety = "^2.3.5" pip-audit = "^2.6" pyupgrade = "^3.10" isort = "^5.12" black = "^23.10" mypy = "^1.6" types-PyMySQL = "^1.0" types-python-dateutil = "^2.8" autoflake = "^2.2" flake8 = "^6.1" flake8-logging-format = "^0.9" flake8-comprehensions = "^3.14" flake8-eradicate = "^1.5" flake8-deprecated = "^2.2" flake8-bugbear = "^23.7" flake8-warnings = "^0.4" flake8-debugger = "^4.1" flake8-annotations-complexity = "^0.0.8" flake8-fixme = "^1.1" flake8-simplify = "^0.21" flake8-variables-names = "^0.0.6" flake8-bandit = "^4.1" flake8-tidy-imports = "^4.10" flake8-noqa = "^1.3" flake8-useless-assert = "^0.4" flake8-mock = "^0.4" flake8-comments = "^0.1" Flake8-pyproject = "^1.2.3" ruff = "^0.1" [tool.flake8] inline-quotes = "double" max-line-length = 120 max-expression-complexity = 10 max-complexity = 10 ban-relative-imports = true nested-classes-whitelist = ["Config", "Meta"] pytest-parametrize-names-type = "csv" exclude = [ ".cache/*", ".pytest_cache/*", "*/__pycache__/*", ] ignore = [ # use isort instead "I", # use black style "E203", "W", "G004", "VNE003", # user FastAPI Depends in function calls "B008" ] per-file-ignores = [] [tool.autoflake] in-place = true ignore-init-module-imports = true remove-unused-variables = true remove-all-unused-imports = true remove-duplicate-keys = true [tool.isort] profile = "black" multi_line_output = 3 src_paths = ["src",] combine_as_imports = true [tool.mypy] allow_redefinition = false namespace_packages = true check_untyped_defs = true disallow_untyped_decorators = false disallow_any_explicit = false disallow_any_generics = true disallow_untyped_calls = true disallow_untyped_defs = true ignore_errors = false ignore_missing_imports = true implicit_reexport = false local_partial_types = true strict_optional = true strict_equality = true show_error_codes = true no_implicit_optional = true warn_unused_ignores = true warn_redundant_casts = true warn_unused_configs = true warn_unreachable = true warn_no_return = true exclude = [ "src/migrations/versions/*" ] plugins = [ "sqlalchemy.ext.mypy.plugin", ] [tool.black] line-length = 120 target-version = ['py311'] [tool.coverage.run] relative_files = true concurrency = ["greenlet", "thread"] [tool.coverage.report] sort = "cover" skip_covered = true [tool.ruff] extend-select = ["F", "I", "PL", "E", "W", "C4", "PT", "B", "T10", "SIM", "TID", "T20", "PGH", "S", "RET", "ERA", "PIE", "UP", "ASYNC", "ISC", "PERF", "DTZ", "TRY", "C90"] ignore = ["S105", "S106", "PGH003", "TRY003", "TRY004", "PT001", "PT023", "I001"] line-length = 120 output-format="grouped" [tool.ruff.per-file-ignores] "src/data/factories.py" = ["DTZ005", ] "src/data/get_data.py" = ["T201"] "src/db/utils.py" = ["PERF401"] [tool.ruff.pylint] max-args = 15 [tool.ruff.flake8-bugbear] # Allow default arguments like, e.g., `data: List[str] = fastapi.Query(None)`. extend-immutable-calls = [] [tool.ruff.flake8-pytest-style] parametrize-names-type = "csv" [tool.ruff.mccabe] max-complexity = 15 [tool.ruff.isort] force-wrap-aliases = true combine-as-imports = true [tool.ruff.flake8-quotes] inline-quotes = "double"