-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
118 lines (95 loc) · 2.96 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
[tool.mypy]
python_version = '3.10'
# Ensure full coverage
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
check_untyped_defs = true
# Restrict dynamic typing
disallow_any_generics = true
disallow_subclassing_any = true
warn_return_any = true
# Know exactly what you're doing
warn_redundant_casts = true
warn_unused_ignores = true
warn_unused_configs = true
warn_unreachable = true
show_error_codes = true
show_column_numbers = true
# Explicit is better than implicit
no_implicit_optional = true
# Ignore all untyped third-party packages.
ignore_missing_imports = true
follow_imports = 'silent'
[tool.ruff]
line-length = 120
indent-width = 4
target-version = 'py310'
[tool.ruff.lint]
select = ['ALL']
ignore = [
'ANN', # flake8-annotations
'D', # pydocstyle
'INP001', # flake8-no-pep420: implicit-namespace-package
'PD901', # pandas-df-variable-name: Avoid using the generic variable name df for DataFrames
'PLR0913', # Pylint: too-may-arguments
'TRY', # tryceratops
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ['ALL']
unfixable = []
# If lint.pycodestyle.ignore-overlong-task-comments is true,
# this rule will also ignore comments that start with any of the specified lint.task-tags
task-tags = ['+ ', '! ', '? ', '* ']
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.per-file-ignores]
'__init__.py' = ['D104']
'__main__.py' = ['D103', 'D104']
'geometry.py' = ['N803', 'N806']
[tool.ruff.lint.flake8-quotes]
docstring-quotes = 'double'
inline-quotes = 'single'
multiline-quotes = 'double'
[tool.ruff.lint.isort]
force-single-line = true
[tool.ruff.lint.pycodestyle]
ignore-overlong-task-comments = true
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.format]
# Unlike Black, use double quotes for strings.
quote-style = 'single'
# 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.numpydoc_validation]
checks = [
"all", # report on all checks
"ES01", # but don't require an extended summary
"EX01", # or examples
"SA01", # or a see also section
"SS06", # and don't require the summary to fit on one line
]
exclude = [ # don't report on checks for these
'\.undocumented_method$',
'\.__init__$',
'\.__repr__$',
'\.__str__$',
'__main__', # exclude __main__.py
]
override_SS05 = [ # allow docstrings to start with these words
'^Process ',
'^Assess ',
'^Access ',
]