mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Bump ruff to 0.4.3 (#116749)
This commit is contained in:
parent
ac0eabad9f
commit
a5df229715
@ -1,6 +1,6 @@
|
||||
repos:
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.4.2
|
||||
rev: v0.4.3
|
||||
hooks:
|
||||
- id: ruff
|
||||
args:
|
||||
|
@ -651,11 +651,8 @@ def websocket_delete_all_refresh_tokens(
|
||||
continue
|
||||
try:
|
||||
hass.auth.async_remove_refresh_token(token)
|
||||
except Exception as err: # pylint: disable=broad-except
|
||||
getLogger(__name__).exception(
|
||||
"During refresh token removal, the following error occurred: %s",
|
||||
err,
|
||||
)
|
||||
except Exception: # pylint: disable=broad-except
|
||||
getLogger(__name__).exception("Error during refresh token removal")
|
||||
remove_failed = True
|
||||
|
||||
if remove_failed:
|
||||
|
@ -659,7 +659,7 @@ filterwarnings = [
|
||||
]
|
||||
|
||||
[tool.ruff]
|
||||
required-version = ">=0.4.2"
|
||||
required-version = ">=0.4.3"
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = [
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Automatically generated from .pre-commit-config.yaml by gen_requirements_all.py, do not edit
|
||||
|
||||
codespell==2.2.6
|
||||
ruff==0.4.2
|
||||
ruff==0.4.3
|
||||
yamllint==1.35.1
|
||||
|
@ -561,11 +561,15 @@ async def test_ws_delete_all_refresh_tokens_error(
|
||||
"message": "During removal, an error was raised.",
|
||||
}
|
||||
|
||||
assert (
|
||||
"homeassistant.components.auth",
|
||||
logging.ERROR,
|
||||
"During refresh token removal, the following error occurred: I'm bad",
|
||||
) in caplog.record_tuples
|
||||
records = [
|
||||
record
|
||||
for record in caplog.records
|
||||
if record.msg == "Error during refresh token removal"
|
||||
]
|
||||
assert len(records) == 1
|
||||
assert records[0].levelno == logging.ERROR
|
||||
assert records[0].exc_info and str(records[0].exc_info[1]) == "I'm bad"
|
||||
assert records[0].name == "homeassistant.components.auth"
|
||||
|
||||
for token in tokens:
|
||||
refresh_token = hass.auth.async_get_refresh_token(token["id"])
|
||||
|
Loading…
x
Reference in New Issue
Block a user