forked from home-assistant/core
Only return empty string if non-fixable errors (#50508)
This commit is contained in:
@@ -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()
|
||||||
|
Reference in New Issue
Block a user