mirror of
https://github.com/netbox-community/netbox.git
synced 2026-03-21 20:18:38 -06:00
Fixes #21407: Enable I (isort) and stabilize import ordering (#21458)
CI / build (20.x, 3.12) (push) Failing after 10s
CI / build (20.x, 3.13) (push) Failing after 9s
CI / build (20.x, 3.14) (push) Failing after 9s
CodeQL / Analyze (actions) (push) Failing after 37s
CodeQL / Analyze (javascript-typescript) (push) Failing after 48s
CodeQL / Analyze (python) (push) Failing after 49s
CI / build (20.x, 3.12) (push) Failing after 10s
CI / build (20.x, 3.13) (push) Failing after 9s
CI / build (20.x, 3.14) (push) Failing after 9s
CodeQL / Analyze (actions) (push) Failing after 37s
CodeQL / Analyze (javascript-typescript) (push) Failing after 48s
CodeQL / Analyze (python) (push) Failing after 49s
- Adopt Ruff `I` (isort) rules for consistent import sorting - Add two `# isort: split` boundaries to keep required imports pinned in `__init__.py` modules
This commit is contained in:
@@ -36,6 +36,7 @@ extend-select = [
|
||||
"E3", # pycodestyle errors: blank lines / spacing around definitions
|
||||
"E501", # pycodestyle: line too long (enforced with `line-length` above)
|
||||
"W", # pycodestyle warnings (various style warnings, often whitespace/newlines)
|
||||
"I", # import sorting (isort-equivalent)
|
||||
]
|
||||
ignore = [
|
||||
"F403", # pyflakes: `from ... import *` used; unable to detect undefined names
|
||||
@@ -44,6 +45,23 @@ ignore = [
|
||||
]
|
||||
preview = true
|
||||
|
||||
[lint.isort]
|
||||
known-first-party = [
|
||||
"account",
|
||||
"circuits",
|
||||
"core",
|
||||
"dcim",
|
||||
"extras",
|
||||
"ipam",
|
||||
"netbox",
|
||||
"tenancy",
|
||||
"users",
|
||||
"utilities",
|
||||
"virtualization",
|
||||
"vpn",
|
||||
"wireless",
|
||||
]
|
||||
|
||||
[lint.per-file-ignores]
|
||||
"template_code.py" = ["E501"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user