forked from tpvasconcelos/ridgeplot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruff.toml
127 lines (105 loc) · 4.09 KB
/
ruff.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
# ================================================
# Top-level settings
# ================================================
target-version = "py39"
fix = true
line-length = 100
# ================================================
# Formatting settings
# ================================================
[format]
line-ending = "lf"
docstring-code-format = false
# ================================================
# Linting settings
# ================================================
[lint]
select = ["ALL"]
ignore = [
# Ignored groups:
"FBT", # flake8-boolean-trap
"FIX", # flake8-fixme
# flake8-comprehensions
"C408", # Unnecessary `dict` call (rewrite as a literal)
# pydocstyle
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D105", # Missing docstring in magic method
"D107", # Missing docstring in __init__
"D205", # 1 blank line required between summary line and description
"D209", # Multi-line docstring closing quotes should be on a separate line
"D400", # First line should end with a period
"D415", # First line should end with a period, question mark, or exclamation point
# flake8-return
"RET504", # Unnecessary variable assignment before `return` statement
# eradicate (ERA)
"ERA001", # Found commented-out code
# pandas-vet
"PD015", # Use `.merge` method instead of `pd.merge` function. They have equivalent functionality.
"PD901", # `df` is a bad variable name. Be kinder to your future self.
# pylint
"PLR0913", # Too many arguments to function call ({x} > 5)
"PLR2004", # Magic value used in comparison, consider replacing {x} with a constant variable
# tryceratops
"TRY003", # Avoid specifying long messages outside the exception class
# flake8-commas (COM)
"COM812", # Trailing comma missing
# flake8-errmsg (EM)
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use an f-string literal, assign to variable first
"EM103", # Exception must not use a .format() string directly, assign to variable first
# pep8-naming
# (allow for sklearn's naming convention for uppercase `X`)
"N803", # Argument name should be lowercase
"N806", # Variable in function should be lowercase
# flake8-todos (TD)
"TD001", # Invalid TODO tag: `FIXME`
"TD002", # Missing author in [...]
"TD003", # Missing issue link on the line following this TODO
# flake8-annotations (ANN)
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in {name}
]
[lint.per-file-ignores]
"cicd_utils/*" = [
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"INP001", # File {x} is part of an implicit namespace package. Add an `__init__.py`
"T201", # `print` found
]
"docs/conf.py" = [
"D100", # Missing docstring in public module
"ARG001", # Unused function argument
"INP001", # File {x} is part of an implicit namespace package. Add an `__init__.py`
"S101", # Use of assert detected
"T201", # `print` found
]
"tests/*" = [
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"INP001", # File {x} is part of an implicit namespace package. Add an `__init__.py`
"S101", # Use of assert detected
"SLF001", # Private member accessed: `_X`
]
"misc/brand/logo.ipynb" = [
"E501", # Line too long
"W505", # Doc line too long
]
[lint.flake8-annotations]
mypy-init-return = true
[lint.flake8-comprehensions]
allow-dict-calls-with-keyword-arguments = true
[lint.flake8-import-conventions]
extend-aliases = { "numpy.typing" = "npt", "plotly.graph_objects" = "go", "plotly.express" = "px" }
banned-from = ["pandas", "numpy"]
[lint.isort]
force-wrap-aliases = true
combine-as-imports = true
required-imports = ["from __future__ import annotations"]
known-first-party = ["ridgeplot", "cicd", "ridgeplot_examples"]
[lint.mccabe]
max-complexity = 10
[lint.pycodestyle]
max-doc-length = 100
[lint.pydocstyle]
convention = "numpy"