Fix black workaround for format calls

This commit is contained in:
RumovZ 2021-05-18 22:19:09 +02:00
parent fa47f6ec15
commit 3b5e8e5041
3 changed files with 3 additions and 3 deletions

View file

@ -20,7 +20,7 @@ if __name__ == "__main__":
args = ["--diff", "--check"]
# work around issue with latest black
if sys.platform == "win32":
if sys.platform == "win32" and "HOME" in os.environ:
os.environ["USERPROFILE"] = os.environ["HOME"]
retcode = subprocess.run(

View file

@ -162,7 +162,7 @@ def write_file(path: str, hooks: List[Hook], prefix: str, suffix: str):
code += "\n" + suffix
# work around issue with latest black
if sys.platform == "win32":
if sys.platform == "win32" and "HOME" in os.environ:
os.environ["USERPROFILE"] = os.environ["HOME"]
with open(path, "wb") as file:
file.write(code.encode("utf8"))

View file

@ -19,7 +19,7 @@ if __name__ == "__main__":
args = ["--diff", "--check"]
# work around issue with latest black
if sys.platform == "win32":
if sys.platform == "win32" and "HOME" in os.environ:
os.environ["USERPROFILE"] = os.environ["HOME"]
retcode = subprocess.run(