forked from Project-MONAI/MONAI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
85 lines (80 loc) · 1.97 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
[build-system]
requires = [
"wheel",
"setuptools",
"torch>=1.9",
"ninja",
"packaging"
]
[tool.black]
line-length = 120
target-version = ['py38', 'py39', 'py310']
include = '\.pyi?$'
exclude = '''
(
/(
# exclude a few common directories in the root of the project
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| venv
| \.pytype
| _build
| buck-out
| build
| dist
)/
# also separately exclude a file named versioneer.py
| monai/_version.py
)
'''
[tool.pycln]
all = true
exclude = "monai/bundle/__main__.py"
[tool.ruff]
line-length = 133
target-version = "py39"
[tool.ruff.lint]
select = [
"E", "F", "W", # flake8
"NPY", # NumPy specific rules
]
extend-ignore = [
"E741", # ambiguous variable name
"F401", # unused import
"NPY002", # numpy-legacy-random
]
[tool.pytype]
# Space-separated list of files or directories to exclude.
exclude = ["versioneer.py", "_version.py"]
# Space-separated list of files or directories to process.
inputs = ["monai"]
# Keep going past errors to analyze as many files as possible.
keep_going = true
# Run N jobs in parallel.
jobs = 8
# All pytype output goes here.
output = ".pytype"
# Paths to source code directories, separated by ':'.
pythonpath = "."
# Check attribute values against their annotations.
check_attribute_types = true
# Check container mutations against their annotations.
check_container_types = true
# Check parameter defaults and assignments against their annotations.
check_parameter_types = true
# Check variable values against their annotations.
check_variable_types = true
# Comma or space separated list of error names to ignore.
disable = ["pyi-error"]
# Report errors.
report_errors = true
# Experimental: Infer precise return types even for invalid function calls.
precise_return = true
# Experimental: solve unknown types to label with structural types.
protocols = true
# Experimental: Only load submodules that are explicitly imported.
strict_import = false