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:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user