1
1
target-version = " py38"
2
- select = [" ALL" ]
3
- ignore = [
4
- " ANN101" , # Missing type annotation for `self` in method
5
- " ANN102" , # Missing type annotation for `cls` in classmethod
2
+ lint. select = [" ALL" ]
3
+ lint. ignore = [
4
+ " ANN101" , # Missing type annotation for `self` in method
5
+ " ANN102" , # Missing type annotation for `cls` in classmethod
6
6
" ANN401" , # Dynamically typed expressions (typing.Any) are disallowed
7
7
" C901" , # function is too complex (12 > 10)
8
8
" COM812" , # Trailing comma missing
@@ -15,36 +15,34 @@ ignore = [
15
15
" FBT003" , # Boolean positional value in function call
16
16
" FIX002" , # Line contains TODO
17
17
" ISC001" , # Isort
18
- " PLR0911" , # Too many return statements (11 > 6)
18
+ " PLR0911" , # Too many return statements (11 > 6)
19
19
" PLR2004" , # Magic value used in comparison, consider replacing 2 with a constant variable
20
- " PLR0912" , # Too many branches
20
+ " PLR0912" , # Too many branches
21
21
" PLR0913" , # Too many arguments to function call
22
22
" PLR0915" , # Too many statements
23
23
" S101" , # Use of `assert` detected
24
24
" S311" , # Standard pseudo-random generators are not suitable for cryptographic purposes
25
25
" T201" , # print() found
26
26
" T203" , # pprint() found
27
- " TCH001" , # Move application import into a type-checking block
28
- " TCH003" , # Move standard library import into a type-checking block
29
- " TD002" , # Missing author in TODO; try: `# TODO(<author_name>): ...`
30
- " TD003" , # Missing issue link on the line following this TODO
31
- " TD005" , # Missing issue description after `TODO`
32
- " TRY003" , # Avoid specifying long messages outside the exception class
27
+ " TD002" , # Missing author in TODO; try: `# TODO(<author_name>): ...`
28
+ " TD003" , # Missing issue link on the line following this TODO
29
+ " TD005" , # Missing issue description after `TODO`
30
+ " TRY003" , # Avoid specifying long messages outside the exception class
33
31
34
32
# torchinfo-specific ignores
35
- " N803" , # Argument name `A_i` should be lowercase
36
- " N806" , # Variable `G` in function should be lowercase
33
+ " N803" , # Argument name `A_i` should be lowercase
34
+ " N806" , # Variable `G` in function should be lowercase
37
35
" BLE001" , # Do not catch blind exception: `Exception`
38
- " PLW0602" , # Using global for `_cached_forward_pass` but no assignment is done
39
- " PLW0603" , # Using the global statement to update `_cached_forward_pass` is discouraged
40
- " PLW2901" , # `for` loop variable `name` overwritten by assignment target
41
- " SIM108" , # [*] Use ternary operator `model_mode = Mode.EVAL if mode is None else Mode(mode)` instead of `if`-`else`-block
42
- " SLF001" , # Private member accessed: `_modules`
43
- " TCH002" , # Move third-party import into a type-checking block
44
- " TRY004" , # Prefer `TypeError` exception for invalid type
45
- " TRY301" , # Abstract `raise` to an inner function
36
+ " PLW0602" , # Using global for `_cached_forward_pass` but no assignment is done
37
+ " PLW0603" , # Using the global statement to update `_cached_forward_pass` is discouraged
38
+ " PLW2901" , # `for` loop variable `name` overwritten by assignment target
39
+ " SIM108" , # [*] Use ternary operator `model_mode = Mode.EVAL if mode is None else Mode(mode)` instead of `if`-`else`-block
40
+ " SLF001" , # Private member accessed: `_modules`
41
+ " TCH002" , # Move third-party import into a type-checking block
42
+ " TRY004" , # Prefer `TypeError` exception for invalid type
43
+ " TRY301" , # Abstract `raise` to an inner function
46
44
]
47
- exclude = [" tests" ] # TODO: check tests too
45
+ exclude = [" tests" ] # TODO: check tests too
48
46
49
- [flake8-pytest-style ]
47
+ [lint . flake8-pytest-style ]
50
48
fixture-parentheses = false
0 commit comments