agenda_culturel/pyproject.toml

99 lines
2.0 KiB
TOML
Raw Permalink Normal View History

2023-05-10 09:02:59 +02:00
[project]
name = "project"
version = "0.1.0"
authors = ["Your Name <your.email@test.com>"]
# TESTING
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q --force-sugar --no-migrations --reuse-db --log-cli-level=INFO"
testpaths = [
"tests",
]
pythonpath = [".", "src"]
python_files = "tests.py test_*.py *_tests.py"
DJANGO_SETTINGS_MODULE = "agenda_culturel.settings.test"
2023-05-10 13:19:19 +02:00
filterwarnings = [
'ignore::DeprecationWarning:kombu.*:',
'ignore::DeprecationWarning:celery.*:',
]
2023-05-10 09:02:59 +02:00
[tool.coverage.report]
fail_under = 85
show_missing = "true"
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
"import*",
"def __str__",
"def on_success",
"def clean",
"if missing",
"if relations.exists()",
"(FileDoesNotExistException, FileNotSupportedException)",
]
[tool.coverage.run]
omit = [
"*/tests/*",
"*/migrations/*",
"*/urls.py",
"*/settings/*",
"*/wsgi.py",
"manage.py",
"*__init__.py",
]
source = ["src"]
# LINTING
[tool.black]
line-length = 88
target-version = ['py311']
include = '\.pyi?$'
# 'extend-exclude' excludes files or directories in addition to the defaults
extend-exclude = '''
2023-05-10 14:02:09 +02:00
^(.*/)?migrations/.*$
2023-05-10 09:02:59 +02:00
'''
[tool.ruff]
2023-05-10 13:19:19 +02:00
format = "grouped"
2023-05-10 09:02:59 +02:00
line-length = 88 # black default
extend-exclude = [
2023-05-10 14:02:09 +02:00
"src/migrations/*",
2023-05-10 09:02:59 +02:00
"src/media/*",
"src/static/*",
"src/manage.py",
"*/test_data/*",
"*__init__.py",
]
select = ["E", "F"]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # too complex
"F405", # name may be undefined, or defined from star imports
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python 3.11.
target-version = "py311"
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.ruff.isort]
force-to-top = ["src"]
known-first-party = ["src"]