ttvdrops/pyproject.toml

94 lines
3.8 KiB
TOML

[project]
name = "ttvdrops"
version = "0.1.0"
description = "Get notified when a new drop is available on Twitch."
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"dateparser>=1.2.2",
"django-debug-toolbar>=5.2.0",
"django>=5.2.4",
"djlint>=1.36.4",
"json-repair>=0.50.0",
"platformdirs>=4.3.8",
"python-dotenv>=1.1.1",
"pygments>=2.19.2",
"httpx>=0.28.1",
"pydantic>=2.12.5",
]
[dependency-groups]
dev = ["pytest>=8.4.1", "pytest-django>=4.11.1"]
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "config.settings"
python_files = ["test_*.py", "*_test.py"]
addopts = ["--reuse-db", "--no-migrations"]
[tool.pyright]
exclude = ["**/migrations/**"]
[tool.ruff]
lint.select = ["ALL"]
# Don't automatically remove unused variables
lint.unfixable = ["F841"]
lint.pydocstyle.convention = "google"
lint.isort.required-imports = ["from __future__ import annotations"]
lint.isort.force-single-line = true
lint.ignore = [
"ANN002", # Checks that function *args arguments have type annotations.
"ANN003", # Checks that function **kwargs arguments have type annotations.
"C901", # Checks for functions with a high McCabe complexity.
"CPY001", # Checks for the absence of copyright notices within Python files.
"D100", # Checks for undocumented public module definitions.
"D104", # Checks for undocumented public package definitions.
"D105", # Checks for undocumented magic method definitions.
"D106", # Checks for undocumented public class definitions, for nested classes.
"ERA001", # Checks for commented-out Python code.
"FIX002", # Checks for "TODO" comments.
"PLR0911", # Checks for functions or methods with too many return statements.
"PLR0912", # Checks for functions or methods with too many branches, including (nested) if, elif, and else branches, for loops, try-except clauses, and match and case statements.
"PLR6301", # Checks for the presence of unused self parameter in methods definitions.
"RUF012", # Checks for mutable default values in class attributes.
# Conflicting lint rules when using Ruff's formatter
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"COM812", # Checks for the absence of trailing commas.
"COM819", # Checks for the presence of prohibited trailing commas.
"D206", # Checks for docstrings that are indented with tabs.
"D300", # Checks for docstrings that use '''triple single quotes''' instead of """triple double quotes""".
"E111", # Checks for indentation with a non-multiple of 4 spaces.
"E114", # Checks for indentation of comments with a non-multiple of 4 spaces.
"E117", # Checks for over-indented code.
"ISC001", # Checks for implicitly concatenated strings on a single line.
"ISC002", # Checks for implicitly concatenated strings that span multiple lines.
"Q000", # Checks for inline strings that use single quotes or double quotes, depending on the value of the lint.flake8-quotes.inline-quotes option.
"Q001", # Checks for multiline strings that use single quotes or double quotes, depending on the value of the lint.flake8-quotes.multiline-quotes setting.
"Q002", # Checks for docstrings that use single quotes or double quotes, depending on the value of the lint.flake8-quotes.docstring-quotes setting.
"Q003", # Checks for strings that include escaped quotes, and suggests changing the quote style to avoid the need to escape them.
"W191", # Checks for indentation that uses tabs.
]
preview = true
unsafe-fixes = true
fix = true
line-length = 160
[tool.ruff.lint.per-file-ignores]
"**/tests/**" = [
"ARG",
"FBT",
"PLR2004",
"S101",
"S311",
"S106",
"PLR6301",
"S105",
]
"**/migrations/**" = ["RUF012"]
[tool.djlint]
profile = "django"
ignore = "H021"