-
Notifications
You must be signed in to change notification settings - Fork 145
/
pyproject.toml
95 lines (82 loc) · 2.98 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
# THIS IS NOT DESCRIBING A PACKAGE, but the DEV environment of this mono-repo
# In order to install the packages of this mono-repo from source, refer to the pyproject.toml in the relevant folder
[project]
authors = [
{name = "Vizro Team"}
]
description = "Vizro is a package to facilitate visual analytics."
name = "vizro"
[tool.bandit]
exclude_dirs = ["tests"]
[tool.codespell]
builtin = "clear,rare,en-GB_to_en-US"
ignore-words-list = "grey,ned,sav,Thur"
skip = "*.min.css.map,*.min.css,.vale/*, *assets/*,.github/*"
[tool.mypy]
# strict checks : strict = true
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = false
disallow_subclassing_any = false
disallow_untyped_calls = false
disallow_untyped_decorators = false
disallow_untyped_defs = false
no_implicit_optional = true
no_implicit_reexport = false
plugins = ["pydantic.mypy"]
strict_equality = true
warn_redundant_casts = true
warn_return_any = false
warn_unused_configs = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
disable_error_code = "name-defined"
module = "vizro.models.types"
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
[tool.ruff]
line-length = 120
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
# see: https://beta.ruff.rs/docs/rules/
ignore = [
"D104", # undocumented-public-package
"D401", # first-line should be in imperative mood
# D407 needs to be ignored as it otherwise messes up the formatting in our API docs
"D407", # missing dashed underline after section
"PD901" # allow using the generic variable name `df` for DataFrames
]
select = [
"E", # pycodestyle errors for style conventions of PEP 8
"W", # pycodestyle warnings for style conventions of PEP 8
"F", # pyflakes for Python errors
"I", # isort for sorting imports
"D", # pydocstyle for docstrings
"T201", # flake8-print for detecting print statement
"C4", # flake8-comprehensions for better list/set/dict comprehensions
"RUF", # Ruff-specific rules
"PL", # pylint
"PD", # pandas-vet for linting pandas code
"UP", # pyupgrade for upgrading syntax to new Python versions
"PERF", # perflint for performance anti-patterns
"FURB" # refurb for reburbishing and modernizing
]
[tool.ruff.lint.per-file-ignores]
# Tests can use magic values, assertions, and relative imports, ignore missing docstrings,
# compare to empty string
"**/tests/**" = ["PLR2004", "S101", "TID252", "D100", "D101", "D102", "D103", "PLC1901", "RUF012"]
# Ignore import violations in all __init__.py files
"__init__.py" = ["E402", "F401"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pylint]
max-args = 6
[tool.ruff.lint.pyupgrade]
# Don't do PEP 604 rewrites (e.g. Union[str, int] -> str | int), even in files that import
# `from __future__ import annotations`. This is needed since pydantic relies on the runtime behavior in Python 3.9.
# When we drop Python 3.9 we can remove this setting.
keep-runtime-typing = true