Skip to content

Commit 1fa17b0

Browse files
committed
test: set ruff lines-between-types and enable I001
Set the `tool.ruff.lint.isort.lines-between-types` configuration option to match the `tool.isort.lines_between_types` option and check for a single blank line between `import X` and `from Y import Z` lines. Select rule I001 to check for this. Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
1 parent 94dda8c commit 1fa17b0

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎pyproject.toml‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,16 +334,15 @@ ignore = [
334334
'D212', # multi-line-summary-first-line
335335
'Q001', # bad-quotes-multiline-string
336336
'PTH123', # builtin-open
337-
338-
# FIXME: I001 fails on blank line between `import X` and `from Y import Z`
339-
# However, it is allowed by isort and ruff format
340-
'I001',
341337
]
342338

343339
[tool.ruff.lint.flake8-quotes]
344340
inline-quotes = 'single'
345341
multiline-quotes = 'single'
346342

343+
[tool.ruff.lint.isort]
344+
lines-between-types = 1
345+
347346
[tool.ruff.lint.per-file-ignores]
348347
'docs/*' = [
349348
'INP001', # implicit-namespace-package, since docs is not a package

0 commit comments

Comments
 (0)