@@ -71,6 +71,28 @@ version.source = "vcs"
71
71
[tool .black ]
72
72
line-length = 120
73
73
74
+ [tool .ruff ]
75
+ select = [" ALL" ]
76
+ line-length = 120
77
+ target-version = " py37"
78
+ isort = {known-first-party = [" tox" , " tests" ], required-imports = [" from __future__ import annotations" ]}
79
+ ignore = [
80
+ " ANN101" , # no typoe annotation for self
81
+ " ANN401" , # allow Any as type annotation
82
+ " D203" , # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
83
+ " D212" , # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible
84
+ " S104" , # Possible binding to all interface
85
+ ]
86
+ [tool .ruff .per-file-ignores ]
87
+ "tests/**/*.py" = [
88
+ " S101" , # asserts allowed in tests...
89
+ " FBT" , # don"t care about booleans as positional arguments in tests
90
+ " INP001" , # no implicit namespace
91
+ " D" , # don"t care about documentation in tests
92
+ " S603" , # `subprocess` call: check for execution of untrusted input
93
+ " PLR2004" , # Magic value used in comparison, consider replacing with a constant variable
94
+ ]
95
+
74
96
[tool .pytest .ini_options ]
75
97
testpaths = [" tests" ]
76
98
@@ -95,25 +117,3 @@ python_version = "3.10"
95
117
strict = true
96
118
exclude = " ^(.*/roots/.*)|(tests/test_integration.py)$"
97
119
overrides = [{ module = [" sphobjinv.*" ], ignore_missing_imports = true }]
98
-
99
- [tool .ruff ]
100
- select = [" ALL" ]
101
- line-length = 120
102
- target-version = " py37"
103
- isort = {known-first-party = [" tox" , " tests" ], required-imports = [" from __future__ import annotations" ]}
104
- ignore = [
105
- " ANN101" , # no typoe annotation for self
106
- " ANN401" , # allow Any as type annotation
107
- " D203" , # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
108
- " D212" , # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible
109
- " S104" , # Possible binding to all interface
110
- ]
111
- [tool .ruff .per-file-ignores ]
112
- "tests/**/*.py" = [
113
- " S101" , # asserts allowed in tests...
114
- " FBT" , # don"t care about booleans as positional arguments in tests
115
- " INP001" , # no implicit namespace
116
- " D" , # don"t care about documentation in tests
117
- " S603" , # `subprocess` call: check for execution of untrusted input
118
- " PLR2004" , # Magic value used in comparison, consider replacing with a constant variable
119
- ]
0 commit comments