mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Only return empty string if non-fixable errors (#50508)
This commit is contained in:
parent
b35f229674
commit
2cdf075f95
@ -326,7 +326,7 @@ def generate_and_validate(config: Config) -> str:
|
|||||||
config.add_error("mypy_config", f"Module '{module} doesn't exist")
|
config.add_error("mypy_config", f"Module '{module} doesn't exist")
|
||||||
|
|
||||||
# Don't generate mypy.ini if there're errors found because it will likely crash.
|
# Don't generate mypy.ini if there're errors found because it will likely crash.
|
||||||
if config.errors:
|
if any(not err.fixable for err in config.errors):
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
mypy_config = configparser.ConfigParser()
|
mypy_config = configparser.ConfigParser()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user