mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Fix black workaround for format calls
This commit is contained in:
parent
fa47f6ec15
commit
3b5e8e5041
3 changed files with 3 additions and 3 deletions
|
@ -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(
|
||||
|
|
|
@ -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"))
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue