mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 01:08:12 +00:00
Enable Ruff PT023, disable PT011, PT012, PT018 (#113900)
* Enable Ruff PT023 * Set mark parantheses to False * Disable PT011, PT012, PT018
This commit is contained in:
parent
3b66328591
commit
8e1f57f663
@ -659,6 +659,9 @@ ignore = [
|
||||
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable
|
||||
"PLW2901", # Outer {outer_kind} variable {name} overwritten by inner {inner_kind} target
|
||||
"PT004", # Fixture {fixture} does not return anything, add leading underscore
|
||||
"PT011", # pytest.raises({exception}) is too broad, set the `match` parameter or use a more specific exception
|
||||
"PT012", # `pytest.raises()` block should contain a single simple statement
|
||||
"PT018", # Assertion should be broken down into multiple parts
|
||||
"SIM102", # Use a single if statement instead of nested if statements
|
||||
"SIM108", # Use ternary operator {contents} instead of if-else-block
|
||||
"SIM115", # Use context handler for opening files
|
||||
@ -683,10 +686,6 @@ ignore = [
|
||||
"PLE0605",
|
||||
|
||||
# temporarily disabled
|
||||
"PT011",
|
||||
"PT018",
|
||||
"PT012",
|
||||
"PT023",
|
||||
"PT019"
|
||||
]
|
||||
|
||||
@ -704,6 +703,7 @@ voluptuous = "vol"
|
||||
|
||||
[tool.ruff.lint.flake8-pytest-style]
|
||||
fixture-parentheses = false
|
||||
mark-parentheses = false
|
||||
|
||||
[tool.ruff.lint.flake8-tidy-imports.banned-api]
|
||||
"async_timeout".msg = "use asyncio.timeout instead"
|
||||
|
@ -100,7 +100,7 @@ async def test_setup_and_stop_waits_for_ha(
|
||||
# We use xfail with this test because there is an unhandled exception
|
||||
# in a background task in this test.
|
||||
# The exception is raised by mqtt.async_publish.
|
||||
@pytest.mark.xfail()
|
||||
@pytest.mark.xfail
|
||||
async def test_startup_no_mqtt(
|
||||
hass: HomeAssistant, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user