forked from tardis-sn/tardis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
130 lines (111 loc) · 3.4 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
[build-system]
requires = ["setuptools",
"setuptools_scm",
"wheel"]
build-backend = 'setuptools.build_meta'
[tool.black]
line-length = 80
target-version = ['py36']
exclude = '''
(
/(
\.eggs # all directories in the root of the project
| \.git
| \.hg
| \.mypy_cache
| \.nox
| \.tox
| \.venv
| \.svn
| _build
| buck-out
| build
| dist
)/
| setup.py
| docs/conf.py
| _astropy_init.py
)
'''
[tool.interrogate]
color = true
#exclude = ["setup.py", "docs", "build"]
#fail-under = 90
ignore-init-method = true
ignore-init-module = true
ignore-magic = true
ignore-module = true
ignore-nested-functions = false
ignore-nested-classes = true
ignore-private = true
ignore-property-decorators = true
ignore-regex = ["^test"]
ignore-semiprivate = true
ignore-setters = true
omit-covered-files = false
quiet = false
verbose = 0
#whitelist-regex = []
[tool.ruff]
lint.select = ["ALL"]
exclude=[]
lint.ignore = [ # NOTE: non-permanent exclusions should be added to `.ruff.toml` instead.
# flake8-builtins (A) : shadowing a Python built-in.
# New ones should be avoided and is up to maintainers to enforce.
"A00",
# flake8-annotations (ANN)
"ANN101", # No annotation for `self`.
"ANN102", # No annotation for `cls`.
# flake8-bugbear (B)
"B008", # FunctionCallArgumentDefault
# flake8-commas (COM)
"COM812", # TrailingCommaMissing
"COM819", # TrailingCommaProhibited
# pydocstyle (D)
# Missing Docstrings
"D102", # Missing docstring in public method. Don't check b/c docstring inheritance.
"D105", # Missing docstring in magic method. Don't check b/c class docstring.
# Whitespace Issues
"D200", # FitsOnOneLine
# Docstring Content Issues
"D410", # BlankLineAfterSection. Using D412 instead.
"D400", # EndsInPeriod. NOTE: might want to revisit this.
# pycodestyle (E, W)
"E711", # NoneComparison (see unfixable)
"E741", # AmbiguousVariableName. Physics variables are often poor code variables
# flake8-fixme (FIX)
"FIX002", # Line contains TODO | notes for improvements are OK iff the code works
# pep8-naming (N)
"N803", # invalid-argument-name. Physics variables are often poor code variables
"N806", # non-lowercase-variable-in-function. Physics variables are often poor code variables
# pandas-vet (PD)
"PD",
# flake8-self (SLF)
"SLF001", # private member access
# flake8-todos (TD)
"TD002", # Missing author in TODO
# Ruff-specific rules (RUF)
"RUF005", # unpack-instead-of-concatenating-to-collection-literal -- it's not clearly faster.
]
[tool.ruff.lint.extend-per-file-ignores]
"setup.py" = ["INP001"] # Part of configuration, not a package.
".github/workflows/*.py" = ["INP001"]
"test_*.py" = [
"B018", # UselessExpression
"D", # pydocstyle
"E402", # Module level import not at top of file
"PGH001", # No builtin eval() allowed
"S101", # Use of assert detected
]
".pyinstaller/*.py" = ["INP001"] # Not a package.
"conftest.py" = ["INP001"] # Part of configuration, not a package.
"docs/*.py" = [
"INP001", # implicit-namespace-package. The examples are not a package.
]
[tool.ruff.lint.flake8-annotations]
ignore-fully-untyped = true
mypy-init-return = true
[tool.ruff.lint.isort]
known-first-party = ["tardis", "carsus", "stardis"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"