From 9b0e517b1ce9987d15d6ed748757b514f16e1b55 Mon Sep 17 00:00:00 2001 From: Daniel Haag <121057143+denialhaag@users.noreply.github.com> Date: Wed, 12 Aug 2026 02:01:28 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Remove=20dead=20typing=20compati?= =?UTF-8?q?bility=20module?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 4 ---- python/mqt/core/_compat/typing.py | 29 ----------------------------- 2 files changed, 33 deletions(-) delete mode 100644 python/mqt/core/_compat/typing.py diff --git a/pyproject.toml b/pyproject.toml index a15b074db4..945d59a8fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -215,10 +215,6 @@ ignore = [ "TID252" # Prefer absolute imports over relative imports from parent modules ] future-annotations = true -typing-modules = ["mqt.core._compat.typing"] - -[tool.ruff.lint.flake8-tidy-imports.banned-api] -"typing.assert_never".msg = "Use mqt.core._compat.typing.assert_never instead." [tool.ruff.lint.isort] known-first-party = ["mqt.core"] diff --git a/python/mqt/core/_compat/typing.py b/python/mqt/core/_compat/typing.py deleted file mode 100644 index 9c621a5170..0000000000 --- a/python/mqt/core/_compat/typing.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2023 - 2026 Chair for Design Automation, TUM -# Copyright (c) 2025 - 2026 Munich Quantum Software Company GmbH -# All rights reserved. -# -# SPDX-License-Identifier: MIT -# -# Licensed under the MIT License - -from __future__ import annotations - -import sys -from typing import TYPE_CHECKING - -if sys.version_info >= (3, 11): - from typing import assert_never -elif TYPE_CHECKING: - from typing_extensions import assert_never -else: - - def assert_never(_: object) -> None: - msg = "Expected code to be unreachable" - raise AssertionError(msg) - - -__all__ = ["assert_never"] - - -def __dir__() -> list[str]: - return __all__