mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Fix Ruff UP035 (also deprecated annotation symbols)
This commit is contained in:
@@ -18,7 +18,8 @@
|
||||
|
||||
import lark
|
||||
import ifcopenshell
|
||||
from typing import Optional, Union, Literal, Generator, Any
|
||||
from typing import Optional, Union, Literal, Any
|
||||
from collections.abc import Generator
|
||||
import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper
|
||||
from ifcopenshell.util.doc import get_predefined_type_doc
|
||||
from ifcopenshell.util.element import get_psets
|
||||
|
||||
@@ -20,7 +20,8 @@ import ifcopenshell
|
||||
import ifcopenshell.guid
|
||||
import ifcopenshell.util.element
|
||||
import ifcopenshell.util.representation
|
||||
from typing import Any, Callable, Optional, Union, Literal, overload, Sequence, Generator
|
||||
from typing import Any, Callable, Optional, Union, Literal, overload
|
||||
from collections.abc import Generator, Sequence
|
||||
from collections import namedtuple
|
||||
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
import numpy as np
|
||||
import numpy.typing as npt
|
||||
import ifcopenshell
|
||||
from typing import Literal, Iterable, Optional
|
||||
|
||||
from typing import Literal, Optional
|
||||
from collections.abc import Iterable
|
||||
|
||||
MatrixType = npt.NDArray[np.float64]
|
||||
"""`npt.NDArray[np.float64]`"""
|
||||
|
||||
@@ -22,7 +22,8 @@ import ifcopenshell
|
||||
import ifcopenshell.util.representation
|
||||
import ifcopenshell.util.placement
|
||||
import ifcopenshell.util.shape
|
||||
from typing import Optional, Union, TypedDict, Literal, Generator, Sequence
|
||||
from typing import Optional, Union, TypedDict, Literal
|
||||
from collections.abc import Generator, Sequence
|
||||
|
||||
|
||||
CONTEXT_TYPE = Literal["Model", "Plan", "NotDefined"]
|
||||
|
||||
@@ -35,7 +35,8 @@ import ifcopenshell.util.shape
|
||||
import ifcopenshell.util.system
|
||||
import ifcopenshell.util.unit
|
||||
from decimal import Decimal
|
||||
from typing import Optional, Any, Union, Iterable
|
||||
from typing import Optional, Any, Union
|
||||
from collections.abc import Iterable
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
from types import EllipsisType
|
||||
|
||||
@@ -20,7 +20,8 @@ import datetime
|
||||
import ifcopenshell.util.date
|
||||
from math import floor
|
||||
from functools import cache
|
||||
from typing import Union, Literal, Optional, Iterator
|
||||
from typing import Union, Literal, Optional
|
||||
from collections.abc import Iterator
|
||||
|
||||
|
||||
DURATION_TYPE = Literal["ELAPSEDTIME", "WORKTIME", "NOTDEFINED"]
|
||||
|
||||
@@ -27,7 +27,7 @@ import ifcopenshell.util.representation
|
||||
from ifcopenshell.util.shape_builder import VectorType
|
||||
from math import radians, cos
|
||||
from ifcopenshell.geom import ShapeElementType, ShapeType
|
||||
from typing import Optional, Literal, Union, Iterable
|
||||
from typing import Optional, Literal, Union
|
||||
|
||||
tol = 1e-6
|
||||
AXIS_LITERAL = Literal["X", "Y", "Z"]
|
||||
|
||||
@@ -28,7 +28,8 @@ import ifcopenshell.util.placement
|
||||
import ifcopenshell.util.representation
|
||||
import ifcopenshell.util.unit
|
||||
from math import cos, sin, pi, tan, radians, degrees, atan, sqrt
|
||||
from typing import Union, Optional, Literal, Any, Sequence, TYPE_CHECKING
|
||||
from typing import Union, Optional, Literal, Any, TYPE_CHECKING
|
||||
from collections.abc import Sequence
|
||||
from itertools import chain
|
||||
|
||||
PRECISION = 1.0e-5
|
||||
|
||||
@@ -18,10 +18,8 @@
|
||||
|
||||
from fractions import Fraction
|
||||
from math import pi
|
||||
from typing import Literal
|
||||
from typing import Optional
|
||||
from typing import Union
|
||||
from typing import Generator
|
||||
from typing import Literal, Optional, Union
|
||||
from collections.abc import Generator
|
||||
|
||||
import ifcopenshell
|
||||
import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper
|
||||
|
||||
Reference in New Issue
Block a user