Keep ruff happy

This commit is contained in:
Thomas Krijnen
2025-08-16 14:07:11 +02:00
parent 0054b27254
commit 0088f3933f
+3 -3
View File
@@ -26,7 +26,7 @@ import functools
import ifcopenshell import ifcopenshell
import weakref import weakref
from pathlib import Path from pathlib import Path
from typing import Any, Optional, TYPE_CHECKING, Union, overload, Literal, TypedDict, Tuple from typing import Any, Optional, TYPE_CHECKING, Union, overload, Literal, TypedDict
from collections.abc import Callable, Generator from collections.abc import Callable, Generator
# py39 compat: re-enable when support is dropped # py39 compat: re-enable when support is dropped
@@ -361,13 +361,13 @@ class file:
file_dict[self.wrapped_data.file_pointer()] = (weakref.ref(self), time.monotonic_ns()) file_dict[self.wrapped_data.file_pointer()] = (weakref.ref(self), time.monotonic_ns())
@property @property
def identifier(self) -> Tuple[int, int]: def identifier(self) -> tuple[int, int]:
"""Pair of C++ file pointer address and creation time stamp to uniquely identify a file """Pair of C++ file pointer address and creation time stamp to uniquely identify a file
over the life time of ifcopenshell module that should be mostly safe except in pathological over the life time of ifcopenshell module that should be mostly safe except in pathological
cases cases
Returns: Returns:
Tuple[int, int]: Pair of C++ file pointer address and creation time stamp tuple[int, int]: Pair of C++ file pointer address and creation time stamp
""" """
return (self.wrapped_data.file_pointer(), file_dict[self.wrapped_data.file_pointer()][1]) return (self.wrapped_data.file_pointer(), file_dict[self.wrapped_data.file_pointer()][1])