From bc49a03c06a4977c21bf851848afd40a3fd965b5 Mon Sep 17 00:00:00 2001 From: Massimo Santini Date: Mon, 25 Mar 2024 18:20:03 +0100 Subject: [PATCH] Ruff do you love me? --- src/scripts.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/scripts.py b/src/scripts.py index 16ef4b9..f257853 100644 --- a/src/scripts.py +++ b/src/scripts.py @@ -7,11 +7,10 @@ def install_antlrjar(): jars = Path('jars') jars.mkdir(exist_ok=True) - with (jars / FILE).open('wb') as ouf: - with urlopen(URL) as inf: - ouf.write(inf.read()) + with (jars / FILE).open('wb') as ouf, urlopen(URL) as inf: # noqa: S310 + ouf.write(inf.read()) - print(f'Remember to add set ANTLR4_JAR="{(jars / FILE).resolve()}" in your environment') + print(f'Remember to add set ANTLR4_JAR="{(jars / FILE).resolve()}" in your environment') # noqa: T201 if __name__ == '__main__':