-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
131 lines (112 loc) · 3.03 KB
/
pyproject.toml
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
[build-system]
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"]
build-backend = "setuptools.build_meta"
# Enables the usage of setuptools_scm
[tool.setuptools_scm]
[tool.pyright]
exclude = ["build/**"]
[tool.isort]
profile = "black"
line_length = 120
extend_skip_glob = ["venv*/*", "log/*", "migrations/*"]
[tool.black]
line_length = 120
extend-exclude = "venv.*|migrations.*"
[tool.ruff]
line-length = 120
src = ["src"]
lint.select = ["C901", "D"]
extend-exclude = ["log", "migrations"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"D103", # Missing docstring in public function
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.pylint.master]
recursive = "yes"
# The following settings modify the behavior when running pylint with pylint.extensions.docparams plugin loaded
accept-no-param-doc = "no"
accept-no-raise-doc = "no"
accept-no-return-doc = "no"
accept-no-yields-doc = "no"
ignore = [
"conf.py", # The Sphinx config file
"build",
"dist",
"log",
"migrations",
]
ignore-patterns = [
"venv.*",
"^\\..+", # Ignore hidden folders or files
"migrations.*",
]
[tool.pylint.messages_control]
max-line-length = 120
# https://github.com/samuelcolvin/pydantic/issues/1961
extension-pkg-whitelist = "pydantic"
# ignore unrecognized-option because of https://github.com/PyCQA/pylint/issues/6799
disable = """
unrecognized-option,
too-few-public-methods,
logging-fstring-interpolation,
too-many-instance-attributes,
too-many-arguments,
missing-function-docstring
"""
[tool.pylint.similarities]
# Exclude the following from code duplication checks
ignore-comments = "yes"
ignore-docstrings = "yes"
ignore-imports = "yes"
ignore-signatures = "yes"
[tool.mypy]
# Functions need to be annotated
disallow_untyped_defs = true
warn_unused_ignores = true
exclude = [
"shop-db2-\\d+", # Ignore temporary folder created by setuptools when building an sdist
"venv.*/",
"log/",
"build/",
"dist/",
"migrations/",
]
[tool.pytest.ini_options]
addopts = """
-vv
--doctest-modules
--import-mode=append
--ignore-glob=shop-db2-[0-9]*
--ignore="migrations"
--ignore="configuration.example.py"
--ignore="docs/_scripts"
--cov=shop_db2
--cov-config=pyproject.toml
--cov-report=
"""
[tool.coverage.run]
branch = true
[tool.coverage.paths]
# Maps coverage measured in site-packages to source files in src
source = ["src/", ".tox/*/lib/python*/site-packages/"]
[tool.coverage.report]
exclude_also = ["\\.\\.\\.", "if TYPE_CHECKING:"]
partial_branches = ["pragma: no branch", "if not TYPE_CHECKING:"]
[tool.coverage.html]
directory = "reports/coverage_html"
[tool.coverage.xml]
output = "reports/coverage.xml"
[[tool.mypy.overrides]]
module = [
# Ignore packages that do not provide type hints here
# For example, add "dash.*" to ignore all imports from Dash
"sphinxawesome_theme.postprocess",
"sqlalchemy.*",
"flask_script.*",
"flask_migrate.*",
"flask_sqlalchemy.*",
"gunicorn.*",
]
ignore_missing_imports = true