mirror of
https://github.com/home-assistant/core.git
synced 2025-06-10 16:17:10 +00:00
Prevent imports from tests in core codebase (#133928)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
This commit is contained in:
parent
2d5e2aa4b4
commit
771ead9d7b
@ -904,6 +904,7 @@ mark-parentheses = false
|
|||||||
[tool.ruff.lint.flake8-tidy-imports.banned-api]
|
[tool.ruff.lint.flake8-tidy-imports.banned-api]
|
||||||
"async_timeout".msg = "use asyncio.timeout instead"
|
"async_timeout".msg = "use asyncio.timeout instead"
|
||||||
"pytz".msg = "use zoneinfo instead"
|
"pytz".msg = "use zoneinfo instead"
|
||||||
|
"tests".msg = "You should not import tests"
|
||||||
|
|
||||||
[tool.ruff.lint.isort]
|
[tool.ruff.lint.isort]
|
||||||
force-sort-within-sections = true
|
force-sort-within-sections = true
|
||||||
|
@ -5,3 +5,7 @@ extend = "../pyproject.toml"
|
|||||||
forced-separate = [
|
forced-separate = [
|
||||||
"tests",
|
"tests",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[lint.flake8-tidy-imports.banned-api]
|
||||||
|
"async_timeout".msg = "use asyncio.timeout instead"
|
||||||
|
"pytz".msg = "use zoneinfo instead"
|
||||||
|
@ -10,6 +10,10 @@ extend-ignore = [
|
|||||||
"SLF001", # Private member accessed: Tests do often test internals a lot
|
"SLF001", # Private member accessed: Tests do often test internals a lot
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[lint.flake8-tidy-imports.banned-api]
|
||||||
|
"async_timeout".msg = "use asyncio.timeout instead"
|
||||||
|
"pytz".msg = "use zoneinfo instead"
|
||||||
|
|
||||||
[lint.isort]
|
[lint.isort]
|
||||||
known-first-party = [
|
known-first-party = [
|
||||||
"homeassistant",
|
"homeassistant",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user