diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 888c3291..d5c7da09 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -57,7 +57,7 @@ repos: # Python linting and formatting using ruff - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.2 + rev: v0.7.3 hooks: - id: ruff args: ["--fix", "--show-fixes"] diff --git a/src/mqt/qcec/_compat/importlib/resources.py b/src/mqt/qcec/_compat/importlib/resources.py index c37dfa5d..875b6825 100644 --- a/src/mqt/qcec/_compat/importlib/resources.py +++ b/src/mqt/qcec/_compat/importlib/resources.py @@ -2,10 +2,10 @@ import sys -if sys.version_info < (3, 10): - from importlib_resources import as_file, files -else: +if sys.version_info >= (3, 10): from importlib.resources import as_file, files +else: + from importlib_resources import as_file, files __all__ = ["as_file", "files"] diff --git a/src/mqt/qcec/_compat/typing.py b/src/mqt/qcec/_compat/typing.py index 58f72aee..1637a60b 100644 --- a/src/mqt/qcec/_compat/typing.py +++ b/src/mqt/qcec/_compat/typing.py @@ -3,11 +3,10 @@ import sys -if sys.version_info < (3, 11): - from typing_extensions import Unpack - -else: +if sys.version_info >= (3, 11): from typing import Unpack +else: + from typing_extensions import Unpack __all__ = ["Unpack"]