File tree 2 files changed +8
-6
lines changed
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,6 @@ repos:
10
10
- id : check-yaml
11
11
- id : debug-statements
12
12
- id : mixed-line-ending
13
- - repo : https://github.com/MarcoGorelli/absolufy-imports
14
- rev : v0.3.1
15
- hooks :
16
- - id : absolufy-imports
17
- name : absolufy-imports
18
- files : ^xarray/
19
13
- repo : https://github.com/astral-sh/ruff-pre-commit
20
14
# Ruff version.
21
15
rev : ' v0.1.9'
Original file line number Diff line number Diff line change @@ -242,6 +242,9 @@ extend-exclude = [
242
242
" doc" ,
243
243
" _typed_ops.pyi" ,
244
244
]
245
+ extend-safe-fixes = [
246
+ " TID252" , # absolute imports
247
+ ]
245
248
target-version = " py39"
246
249
247
250
[tool .ruff .lint ]
@@ -257,13 +260,18 @@ select = [
257
260
" F" , # Pyflakes
258
261
" E" , # Pycodestyle
259
262
" W" ,
263
+ " TID" , # flake8-tidy-imports (absolute imports)
260
264
" I" , # isort
261
265
" UP" , # Pyupgrade
262
266
]
263
267
264
268
[tool .ruff .lint .isort ]
265
269
known-first-party = [" xarray" ]
266
270
271
+ [tool .ruff .lint .flake8-tidy-imports ]
272
+ # Disallow all relative imports.
273
+ ban-relative-imports = " all"
274
+
267
275
[tool .pytest .ini_options ]
268
276
addopts = [" --strict-config" , " --strict-markers" ]
269
277
filterwarnings = [
You can’t perform that action at this time.
0 commit comments