[project] name = "support-ticker" version = "0.1.0" description = "Little tracker for support given as Python Installation Support." #authors = ["Sofus Albert Høgsbro Rose "] #license = "AGPL3" requires-python = "==3.11.*" dependencies = [ "fastapi ~= 0.94", "uvicorn ~= 0.21", "pydantic[email] ~= 2.1", ] [project.optional-dependencies] dev = [ "devtools ~= 0.10.0", "schemathesis ~= 3.19.0", "pre-commit ~= 3.2.1", "ruff ~= 0.0.259", "tan ~= 22.12.1", "mypy ~= 1.1.1", ] #################### # - Tooling: Static Analysis #################### [tool.black] ## - Actually uses tan, which is identical to black but with tab support. ## - Run Before ruff use-tabs = true line-length = 79 target-version = ["py311"] [tool.ruff] ## - Run After tan target-version = "py311" line-length = 79 select = [ "E", # pycodestyle ## General Purpose "F", # pyflakes ## General Purpose "PL", # Pylint ## General Purpose ## Code Quality "TCH", # flake8-type-checking ## Type Checking Block Validator "C90", # mccabe ## Avoid Too-Complex Functions "ERA", # eradicate ## Ban Commented Code "TRY", # tryceratops ## Exception Handling Style "B", # flake8-bugbear ## Opinionated, Probable-Bug Patterns #"N", # pep8-naming ## TODO: Force Good Naming Conventions #"D", # pydocstyle ## TODO: Force docstrings "SIM", # flake8-simplify ## Sanity-Check for Code Simplification "SLF", # flake8-self ## Ban Private Member Access "RUF", # Ruff-specific rules ## Extra Good-To-Have Rules ## Style "I", # isort ## Force import Sorting "UP", # pyupgrade ## Enforce Upgrade to Newer Python Syntaxes "COM", # flake8-commas ## Enforce Trailing Commas "Q", # flake8-quotes ## Finally - Quoting Style! "PTH", # flake8-use-pathlib ## Enforce pathlib usage "A", # flake8-builtins ## Prevent Builtin Shadowing "C4", # flake9-comprehensions ## Check Compehension Appropriateness "DTZ", # flake8-datetimez ## Ban naive Datetime Creation "EM", # flake8-errmsg ## Check Exception String Formatting "ISC", # flake8-implicit-str-concat ## Enforce Good String Literal Concat "G", # flake8-logging-format ## Enforce Good Logging Practices "INP", # flake8-no-pep420 ## Ban PEP420; Enforce __init__.py. "PIE", # flake8-pie ## Misc Opinionated Checks "T20", # flake8-print ## Ban print() "RSE", # flake8-raise ## Check Niche Exception Raising Pattern "RET", # flake8-return ## Enforce Good Returning "ARG", # flake8-unused-arguments ## Ban Unused Arguments # Specific "PT", # flake8-pytest-style ## pytest-Specific Checks ] ignore = [ "B008", # FastAPI uses this for Depends(), Security(), etc. . "E701", # class foo(Parent): pass or if simple: return are perfectly elegant ] task-tags = ["TODO", "REF", "FIXME"] [tool.ruff.flake8-bugbear] extend-immutable-calls = ["fastapi.Depends", "fastapi.Query"] [tool.ruff.pycodestyle] ignore-overlong-task-comments = true [tool.ruff.pydocstyle] convention = "google" [tool.ruff.pylint] max-args = 6 #################### # - Tooling: Type Checking #################### [tool.mypy] plugins = [ "pydantic.mypy" ] follow_imports = "silent" warn_redundant_casts = true warn_unused_ignores = true disallow_any_generics = true check_untyped_defs = true no_implicit_reexport = true # for strict mypy: (this is the tricky one :-)) disallow_untyped_defs = true [tool.pydantic-mypy] # REF: https://docs.pydantic.dev/mypy_plugin/ init_forbid_extra = true init_typed = false warn_required_dynamic_aliases = true warn_untyped_fields = true #################### # - Poetry Integration #################### [build-system] requires = ["setuptools_scm[toml]>=6.2"]