From 6ec12fe7c74e33873d91f4d8fff7b78f23957171 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Thu, 11 Sep 2025 18:38:07 +0200 Subject: [PATCH] :Revert "Temporary Python 3.9 compatibility" This reverts commit 0aae57620f61eaa0e9f5f3cd621fb31e60e8bf0c. --- src/ifcopenshell-python/ifcopenshell/file.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/file.py b/src/ifcopenshell-python/ifcopenshell/file.py index 6fe905b1a4..850ab8c4f6 100644 --- a/src/ifcopenshell-python/ifcopenshell/file.py +++ b/src/ifcopenshell-python/ifcopenshell/file.py @@ -28,9 +28,7 @@ import weakref from pathlib import Path from typing import Any, Optional, TYPE_CHECKING, Union, overload, Literal, TypedDict from collections.abc import Callable, Generator - -# py39 compat: re-enable when support is dropped -# from typing_extensions import assert_never +from typing_extensions import assert_never from . import ifcopenshell_wrapper from .entity_instance import entity_instance @@ -215,9 +213,7 @@ class Transaction: for index, value in data: inverse[index] = self.unserialise_value(inverse, value) else: - # py39 compat: re-enable when support is dropped - # assert_never(operation["action"]) - pass + assert_never(operation["action"]) def commit(self) -> None: for operation in self.operations: @@ -238,9 +234,7 @@ class Transaction: elif operation["action"] == "batch_delete": pass else: - # py39 compat: re-enable when support is dropped - # assert_never(operation["action"]) - pass + assert_never(operation["action"]) file_dict: dict[int, tuple[weakref.ReferenceType[file], int]] = {}