1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-26 22:18:40 +00:00

Move overlapping pylint rules to ruff, disable mypy overlap (#94359)

This commit is contained in:
Franck Nijhof
2023-06-27 17:42:46 +02:00
committed by GitHub
parent 7c676c0a7d
commit 3e85a29b86
88 changed files with 537 additions and 357 deletions

View File

@@ -161,8 +161,8 @@ def verify_version(value: str) -> str:
AwesomeVersionStrategy.PEP440,
],
)
except AwesomeVersionException:
raise vol.Invalid(f"'{value}' is not a valid version.")
except AwesomeVersionException as err:
raise vol.Invalid(f"'{value}' is not a valid version.") from err
return value

View File

@@ -91,7 +91,7 @@ def format_python_namespace(
return f": {annotation}" if annotation else ""
code = "\n\n".join(
f"{key}{_get_annotation(key)}" f" = {to_string(value)}"
f"{key}{_get_annotation(key)} = {to_string(value)}"
for key, value in sorted(content.items())
)
if annotations:

View File

@@ -162,8 +162,8 @@ def _gather_info(fields) -> dict:
if "default" in info:
msg += f" [{info['default']}]"
value = input(f"{msg}\n> ")
except (KeyboardInterrupt, EOFError):
raise ExitApp("Interrupted!", 1)
except (KeyboardInterrupt, EOFError) as err:
raise ExitApp("Interrupted!", 1) from err
value = value.strip()