Only return empty string if non-fixable errors (#50508)

This commit is contained in:
Paulus Schoutsen 2021-05-11 23:54:04 -07:00 committed by GitHub
parent b35f229674
commit 2cdf075f95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -326,7 +326,7 @@ def generate_and_validate(config: Config) -> str:
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.
if config.errors:
if any(not err.fixable for err in config.errors):
return ""
mypy_config = configparser.ConfigParser()