1
+ line-length = 88
2
+
3
+ [lint ]
4
+
5
+ select = [
6
+ # pycodestyle
7
+ " E" ,
8
+ " W" ,
9
+ # Pyflakes
10
+ " F" ,
11
+ # pyupgrade
12
+ " UP" ,
13
+ # flake8-bugbear
14
+ " B" ,
15
+ # flake8-simplify
16
+ " SIM" ,
17
+ # isort
18
+ " I" ,
19
+ # pep8 naming
20
+ " N" ,
21
+ # pydocstyle
22
+ " D" ,
23
+ # annotations
24
+ " ANN" ,
25
+ # debugger
26
+ " T10" ,
27
+ # flake8-pytest
28
+ " PT" ,
29
+ # flake8-return
30
+ " RET" ,
31
+ # flake8-unused-arguments
32
+ " ARG" ,
33
+ # flake8-fixme
34
+ " FIX" ,
35
+ # flake8-eradicate
36
+ " ERA" ,
37
+ # pandas-vet
38
+ " PD" ,
39
+ # numpy-specific rules
40
+ " NPY" ,
41
+ ]
42
+
43
+ ignore = [
44
+ " D104" , # Missing docstring in public package
45
+ " D100" , # Missing docstring in public module
46
+ " D211" , # No blank line before class
47
+ " PD901" , # Avoid using 'df' for pandas dataframes. Perfectly fine in functions with limited scope
48
+ " ANN201" , # Missing return type annotation for public function (makes no sense for NoneType return types...)
49
+ " ANN101" , # Missing type annotation for `self`
50
+ " ANN204" , # Missing return type annotation for special method
51
+ " ANN002" , # Missing type annotation for `*args`
52
+ " ANN003" , # Missing type annotation for `**kwargs`
53
+ " D105" , # Missing docstring in magic method
54
+ " D203" , # 1 blank line before after class docstring
55
+ " D204" , # 1 blank line required after class docstring
56
+ " D413" , # 1 blank line after parameters
57
+ " SIM108" , # Simplify if/else to one line; not always clearer
58
+ " D206" , # Docstrings should be indented with spaces; unnecessary when running ruff-format
59
+ " E501" , # Line length too long; unnecessary when running ruff-format
60
+ " W191" , # Indentation contains tabs; unnecessary when running ruff-format
61
+
62
+ # FIX AND REMOVE BELOW CODES:
63
+ " ANN001" , # Missing type annotation for function argument
64
+ " ANN102" , # Missing type annotation for `cls` in classmethod
65
+ " ANN202" , # Missing return type annotation for private function
66
+ " ANN205" , # Missing return type annotation for staticmethod
67
+ " ANN206" , # Missing return type annotation for classmethod
68
+ " D102" , # Missing docstring in public method
69
+ " D103" , # Missing docstring in public function
70
+ " D107" , # Missing docstring in `__init__`
71
+ " E402" , # Module level import not at top of file
72
+ " ERA001" , # Found commented-out code
73
+ " F401" , # `module` imported but unused
74
+ " F405" , # Name may be undefined, or defined from star imports
75
+ " FIX002" , # Line contains TODO, consider resolving the issue
76
+ " N802" , # Function name should be lowercase
77
+ " PT009" , # Use a regular `assert` instead of unittest-style `assertEqual` / `assertIsInstance`
78
+ " PT027" , # Use `pytest.raises` instead of unittest-style `assertRaisesRegex`
79
+ " UP028" , # Replace `yield` over `for` loop with `yield from`
80
+ " UP029" , # Unnecessary builtin import
81
+ ]
82
+
83
+ [lint .pyupgrade ]
84
+ # Preserve types, even if a file imports `from __future__ import annotations`.
85
+ # Remove when Python 3.9 is no longer supported
86
+ keep-runtime-typing = true
87
+
88
+ [lint .pydocstyle ]
89
+ convention = " google"
0 commit comments