Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
78 lines (69 loc) · 2.46 KB
/
Copy pathpyproject.toml
File metadata and controls
78 lines (69 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
[build-system]
requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"
[tool.ruff]
include = ["pyproject.toml", "*.py"]
extend-include = ["*.ipynb"]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr", ".direnv", ".eggs", ".git", ".git-rewrite", ".hg", ".ipynb_checkpoints", ".mypy_cache",
".nox", ".pants.d", ".pyenv", ".pytest_cache", ".pytype", ".ruff_cache", ".svn", ".tox", ".venv",
".vscode", ".idea", "__pypackages__", "_build", "buck-out", "build", "dist", "node_modules",
"site-packages", "venv", "tests", "alembic"
]
line-length = 119
indent-width = 4
target-version = "py38"
[tool.ruff.lint]
# Never enforce `E501` (line length violations).
# Relax the convention by _not_ requiring documentation for every function parameter.
ignore = ["C901", "E501", "E741", "F402", "F823", "D417", "D101", "D100", "D104"]
# Pycodestyle (E), Pyflakes (F), flake8-bugbear (B), flake8-simplify (SIM), isort (I), pydocstyle (D)
select = ["C", "E", "F", "B", "SIM", "I", "W", "D", "D401"]
# Avoid trying to fix flake8-bugbear (`B`) violations.
unfixable = ["B"]
# Ignore `E402` (import violations) in all `__init__.py` files, and in select subdirectories.
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402"]
"**/{tests,docs,tools}/*" = ["E402"]
[tool.ruff.lint.isort]
lines-after-imports = 2
known-first-party = ["budconnect"]
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
# Enable auto-formatting of code examples in docstrings. Markdown,
# reStructuredText code/literal blocks and doctests are all supported.
docstring-code-format = true
# Set the line length limit used when formatting code snippets in
# docstrings.
docstring-code-line-length = "dynamic"
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.mypy]
plugins = [
"pydantic.mypy"
]
python_version = "3.8"
exclude = [
"alembic/",
]
follow_imports = "silent"
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = false
warn_unused_configs = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
ignore_missing_imports = true
disallow_untyped_defs = true
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "session"