From ad43836bfd532410e72e473384d51be4f7a2ef32 Mon Sep 17 00:00:00 2001 From: Lendemor Date: Tue, 22 Oct 2024 15:34:19 +0200 Subject: [PATCH] ignore SIM115 and reverse change for it --- pyproject.toml | 2 +- reflex/utils/prerequisites.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c16a9b1c4..93f3c5d50 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,7 +91,7 @@ build-backend = "poetry.core.masonry.api" [tool.ruff] target-version = "py39" lint.select = ["B", "D", "E", "F", "I", "SIM", "W"] -lint.ignore = ["B008", "D203", "D205", "D213", "D401", "D406", "D407", "E501", "F403", "F405", "F541"] +lint.ignore = ["B008", "D203", "D205", "D213", "D401", "D406", "D407", "E501", "F403", "F405", "F541", "SIM115"] lint.pydocstyle.convention = "google" [tool.ruff.lint.per-file-ignores] diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index 36cca085b..33165af0e 100644 --- a/reflex/utils/prerequisites.py +++ b/reflex/utils/prerequisites.py @@ -713,7 +713,8 @@ def download_and_run(url: str, *args, show_status: bool = False, **env): response.raise_for_status() # Save the script to a temporary file. - with tempfile.NamedTemporaryFile() as script, open(script.name, "w") as f: + script = tempfile.NamedTemporaryFile() + with open(script.name, "w") as f: f.write(response.text) # Run the script.