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.
This commit is contained in:
Dylan Baker authored and Paolo Bonzini committed 2026-10-24 08:13:14 +02:00
1 parent 14d74d1f5d
commit 4e1397d1e5
1 file changed
+1 -1
+1 -1
View File
@@ -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: