From 4e1397d1e55b412c79c797ace7ecfbeabb1ea5f3 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Thu, 10 Sep 2026 16:20:30 +0000 Subject: [PATCH] Ignore ruff F401 warnings for imports that are being used for existance checks This is the obvious way to do this, try to import, use later if available. Ruff doesn't understand that, so it complains. There just isn't a better way to do this that doesn't end up being a complex dance with `importlib.utils`, specs, etc. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 4b5cb6bf3..626e385f3 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ scm_args = {} HERE = os.path.dirname(__file__) if os.path.exists(os.path.join(HERE, '.git')): try: - import setuptools_scm + import setuptools_scm # noqa: F401 except ModuleNotFoundError: pass else: