Enable RUF101 (#135835)

pull/135845/head^2
Joost Lekkerkerker 2025-01-17 13:01:07 +01:00 committed by GitHub
parent ef8b8fbbaa
commit c651e2b3c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View File

@ -203,7 +203,7 @@ class PlexServer:
config_entry_update_needed = True
else:
# pylint: disable-next=raise-missing-from
raise Unauthorized( # noqa: TRY200
raise Unauthorized( # noqa: B904
"New certificate cannot be validated"
" with provided token"
)

View File

@ -93,7 +93,7 @@ def raise_for_blocking_call(
return
if found_frame is None:
raise RuntimeError( # noqa: TRY200
raise RuntimeError( # noqa: B904
f"Caught blocking call to {func.__name__} "
f"with args {mapped_args.get('args')} "
f"in {offender_filename}, line {offender_lineno}: {offender_line} "

View File

@ -772,6 +772,7 @@ select = [
"RUF033", # __post_init__ method with argument defaults
"RUF034", # Useless if-else condition
"RUF100", # Unused `noqa` directive
"RUF101", # noqa directives that use redirected rule codes
"RUF200", # Failed to parse pyproject.toml: {message}
"S102", # Use of exec detected
"S103", # bad-file-permissions