black formatting
This commit is contained in:
@@ -8,7 +8,6 @@ from Vector import Vector
|
||||
from Placement import Placement
|
||||
from typing import overload
|
||||
|
||||
|
||||
@export(
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
|
||||
@@ -6,7 +6,6 @@ from Metadata import constmethod
|
||||
from PyObjectBase import PyObjectBase
|
||||
from typing import List, Final
|
||||
|
||||
|
||||
class BaseClass(PyObjectBase):
|
||||
"""
|
||||
This is the base class
|
||||
|
||||
@@ -8,7 +8,6 @@ from Vector import Vector
|
||||
from Matrix import Matrix
|
||||
from typing import overload, Any, Final, Tuple, Union
|
||||
|
||||
|
||||
@export(
|
||||
TwinPointer="BoundBox3d",
|
||||
Constructor=True,
|
||||
@@ -137,17 +136,11 @@ class BoundBox(PyObjectBase):
|
||||
...
|
||||
|
||||
@overload
|
||||
def add(self, minMax: Vector, /) -> None:
|
||||
...
|
||||
|
||||
def add(self, minMax: Vector, /) -> None: ...
|
||||
@overload
|
||||
def add(self, minMax: Tuple[float, float, float], /) -> None:
|
||||
...
|
||||
|
||||
def add(self, minMax: Tuple[float, float, float], /) -> None: ...
|
||||
@overload
|
||||
def add(self, x: float, y: float, z: float, /) -> None:
|
||||
...
|
||||
|
||||
def add(self, x: float, y: float, z: float, /) -> None: ...
|
||||
def add(self, *args: Any, **kwargs: Any) -> None:
|
||||
"""
|
||||
add(minMax) -> None
|
||||
@@ -193,13 +186,9 @@ class BoundBox(PyObjectBase):
|
||||
...
|
||||
|
||||
@overload
|
||||
def closestPoint(self, point: Vector, /) -> Vector:
|
||||
...
|
||||
|
||||
def closestPoint(self, point: Vector, /) -> Vector: ...
|
||||
@overload
|
||||
def closestPoint(self, x: float, y: float, z: float, /) -> Vector:
|
||||
...
|
||||
|
||||
def closestPoint(self, x: float, y: float, z: float, /) -> Vector: ...
|
||||
@constmethod
|
||||
def closestPoint(self, *args: Any, **kwargs: Any) -> Vector:
|
||||
"""
|
||||
@@ -220,18 +209,14 @@ class BoundBox(PyObjectBase):
|
||||
...
|
||||
|
||||
@overload
|
||||
def intersect(self, boundBox2: "BoundBox", /) -> bool:
|
||||
...
|
||||
|
||||
def intersect(self, boundBox2: "BoundBox", /) -> bool: ...
|
||||
@overload
|
||||
def intersect(
|
||||
self,
|
||||
base: Union[Vector, Tuple[float, float, float]],
|
||||
dir: Union[Vector, Tuple[float, float, float]],
|
||||
/,
|
||||
) -> bool:
|
||||
...
|
||||
|
||||
) -> bool: ...
|
||||
def intersect(self, *args: Any) -> bool:
|
||||
"""
|
||||
intersect(boundBox2) -> bool
|
||||
@@ -294,17 +279,11 @@ class BoundBox(PyObjectBase):
|
||||
...
|
||||
|
||||
@overload
|
||||
def move(self, displacement: Vector, /) -> None:
|
||||
...
|
||||
|
||||
def move(self, displacement: Vector, /) -> None: ...
|
||||
@overload
|
||||
def move(self, displacement: Tuple[float, float, float], /) -> None:
|
||||
...
|
||||
|
||||
def move(self, displacement: Tuple[float, float, float], /) -> None: ...
|
||||
@overload
|
||||
def move(self, x: float, y: float, z: float, /) -> None:
|
||||
...
|
||||
|
||||
def move(self, x: float, y: float, z: float, /) -> None: ...
|
||||
def move(self, *args: Any, **kwargs: Any) -> None:
|
||||
"""
|
||||
move(displacement) -> None
|
||||
@@ -324,17 +303,11 @@ class BoundBox(PyObjectBase):
|
||||
...
|
||||
|
||||
@overload
|
||||
def scale(self, factor: Vector, /) -> None:
|
||||
...
|
||||
|
||||
def scale(self, factor: Vector, /) -> None: ...
|
||||
@overload
|
||||
def scale(self, factor: Tuple[float, float, float], /) -> None:
|
||||
...
|
||||
|
||||
def scale(self, factor: Tuple[float, float, float], /) -> None: ...
|
||||
@overload
|
||||
def scale(self, x: float, y: float, z: float, /) -> None:
|
||||
...
|
||||
|
||||
def scale(self, x: float, y: float, z: float, /) -> None: ...
|
||||
def scale(self, *args: Any, **kwargs: Any) -> None:
|
||||
"""
|
||||
scale(factor) -> None
|
||||
@@ -378,17 +351,11 @@ class BoundBox(PyObjectBase):
|
||||
...
|
||||
|
||||
@overload
|
||||
def isInside(self, object: Vector, /) -> bool:
|
||||
...
|
||||
|
||||
def isInside(self, object: Vector, /) -> bool: ...
|
||||
@overload
|
||||
def isInside(self, object: "BoundBox", /) -> bool:
|
||||
...
|
||||
|
||||
def isInside(self, object: "BoundBox", /) -> bool: ...
|
||||
@overload
|
||||
def isInside(self, x: float, y: float, z: float, /) -> bool:
|
||||
...
|
||||
|
||||
def isInside(self, x: float, y: float, z: float, /) -> bool: ...
|
||||
def isInside(self, *args: Any) -> bool:
|
||||
"""
|
||||
isInside(object) -> bool
|
||||
|
||||
@@ -10,7 +10,6 @@ from Placement import Placement
|
||||
from Rotation import Rotation
|
||||
from typing import Union
|
||||
|
||||
|
||||
@export(
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
|
||||
@@ -8,7 +8,6 @@ from PyObjectBase import PyObjectBase
|
||||
from enum import IntEnum
|
||||
from typing import overload, Union, Tuple, Sequence
|
||||
|
||||
|
||||
class ScaleType(IntEnum):
|
||||
Other = -1
|
||||
NoScaling = 0
|
||||
@@ -16,7 +15,6 @@ class ScaleType(IntEnum):
|
||||
NonUniformLeft = 2
|
||||
Uniform = 3
|
||||
|
||||
|
||||
@export(
|
||||
TwinPointer="Matrix4D",
|
||||
Constructor=True,
|
||||
@@ -109,13 +107,9 @@ class Matrix(PyObjectBase):
|
||||
"""The matrix elements."""
|
||||
|
||||
@overload
|
||||
def move(self, vector: Vector, /) -> None:
|
||||
...
|
||||
|
||||
def move(self, vector: Vector, /) -> None: ...
|
||||
@overload
|
||||
def move(self, x: float, y: float, z: float, /) -> None:
|
||||
...
|
||||
|
||||
def move(self, x: float, y: float, z: float, /) -> None: ...
|
||||
def move(self, *args) -> None:
|
||||
"""
|
||||
move(vector) -> None
|
||||
@@ -135,17 +129,11 @@ class Matrix(PyObjectBase):
|
||||
...
|
||||
|
||||
@overload
|
||||
def scale(self, vector: Vector, /) -> None:
|
||||
...
|
||||
|
||||
def scale(self, vector: Vector, /) -> None: ...
|
||||
@overload
|
||||
def scale(self, x: float, y: float, z: float, /) -> None:
|
||||
...
|
||||
|
||||
def scale(self, x: float, y: float, z: float, /) -> None: ...
|
||||
@overload
|
||||
def scale(self, factor: float, /) -> None:
|
||||
...
|
||||
|
||||
def scale(self, factor: float, /) -> None: ...
|
||||
def scale(self, *args) -> None:
|
||||
"""
|
||||
scale(vector) -> None
|
||||
@@ -347,13 +335,9 @@ class Matrix(PyObjectBase):
|
||||
...
|
||||
|
||||
@overload
|
||||
def multiply(self, matrix: "Matrix", /) -> "Matrix":
|
||||
...
|
||||
|
||||
def multiply(self, matrix: "Matrix", /) -> "Matrix": ...
|
||||
@overload
|
||||
def multiply(self, vector: Vector, /) -> Vector:
|
||||
...
|
||||
|
||||
def multiply(self, vector: Vector, /) -> Vector: ...
|
||||
@constmethod
|
||||
def multiply(self, obj: Union["Matrix", Vector], /) -> Union["Matrix", Vector]:
|
||||
"""
|
||||
|
||||
@@ -1,40 +1,31 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
"""
|
||||
This file keeps auxiliary metadata to be used by the Python API stubs.
|
||||
"""
|
||||
|
||||
|
||||
def export(**kwargs):
|
||||
"""
|
||||
A decorator to attach metadata to a class.
|
||||
"""
|
||||
...
|
||||
|
||||
|
||||
def constmethod():
|
||||
...
|
||||
|
||||
|
||||
def no_args():
|
||||
...
|
||||
|
||||
|
||||
def constmethod(): ...
|
||||
def no_args(): ...
|
||||
def forward_declarations(source_code):
|
||||
"""
|
||||
A decorator to attach forward declarations to a class.
|
||||
"""
|
||||
...
|
||||
|
||||
|
||||
def class_declarations(source_code):
|
||||
"""
|
||||
A decorator to attach forward declarations to a class.
|
||||
"""
|
||||
...
|
||||
|
||||
|
||||
def sequence_protocol(**kwargs):
|
||||
"""
|
||||
A decorator to attach sequence protocol metadata to a class.
|
||||
|
||||
@@ -6,7 +6,6 @@ from Metadata import constmethod
|
||||
from BaseClass import BaseClass
|
||||
from typing import Final
|
||||
|
||||
|
||||
class Persistence(BaseClass):
|
||||
"""
|
||||
Base.Persistence class.
|
||||
|
||||
@@ -9,7 +9,6 @@ from Rotation import Rotation as RotationPy
|
||||
from Vector import Vector
|
||||
from typing import Sequence, overload
|
||||
|
||||
|
||||
@export(
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
@@ -120,9 +119,7 @@ class Placement(PyObjectBase):
|
||||
@overload
|
||||
def rotate(
|
||||
self, center: Sequence[float], axis: Sequence[float], angle: float, *, comp: bool = False
|
||||
) -> None:
|
||||
...
|
||||
|
||||
) -> None: ...
|
||||
def rotate(self, center: Vector, axis: Vector, angle: float, *, comp: bool = False) -> None:
|
||||
"""
|
||||
rotate(center, axis, angle, comp) -> None
|
||||
|
||||
@@ -4,7 +4,6 @@ from __future__ import annotations
|
||||
|
||||
from PyObjectBase import PyObjectBase
|
||||
|
||||
|
||||
class Precision(PyObjectBase):
|
||||
"""
|
||||
This is the Precision class
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
class PyObjectBase:
|
||||
"""
|
||||
The most base class for Python bindings.
|
||||
|
||||
@@ -7,7 +7,6 @@ from PyObjectBase import PyObjectBase
|
||||
from typing import overload, Final, Tuple, Union
|
||||
from Unit import Unit as UnitPy
|
||||
|
||||
|
||||
@export(
|
||||
NumberProtocol=True,
|
||||
RichCompare=True,
|
||||
@@ -66,13 +65,9 @@ class Quantity(PyObjectBase):
|
||||
...
|
||||
|
||||
@overload
|
||||
def toStr(self, /) -> str:
|
||||
...
|
||||
|
||||
def toStr(self, /) -> str: ...
|
||||
@overload
|
||||
def toStr(self, decimals: int, /) -> str:
|
||||
...
|
||||
|
||||
def toStr(self, decimals: int, /) -> str: ...
|
||||
@constmethod
|
||||
def getUserPreferred(self) -> Tuple["Quantity", str]:
|
||||
"""
|
||||
@@ -81,21 +76,13 @@ class Quantity(PyObjectBase):
|
||||
...
|
||||
|
||||
@overload
|
||||
def getValueAs(self, unit: str, /) -> float:
|
||||
...
|
||||
|
||||
def getValueAs(self, unit: str, /) -> float: ...
|
||||
@overload
|
||||
def getValueAs(self, translation: float, unit_signature: int, /) -> float:
|
||||
...
|
||||
|
||||
def getValueAs(self, translation: float, unit_signature: int, /) -> float: ...
|
||||
@overload
|
||||
def getValueAs(self, unit: UnitPy, /) -> float:
|
||||
...
|
||||
|
||||
def getValueAs(self, unit: UnitPy, /) -> float: ...
|
||||
@overload
|
||||
def getValueAs(self, quantity: "Quantity", /) -> float:
|
||||
...
|
||||
|
||||
def getValueAs(self, quantity: "Quantity", /) -> float: ...
|
||||
@constmethod
|
||||
def getValueAs(self, *args) -> float:
|
||||
"""
|
||||
@@ -119,9 +106,6 @@ class Quantity(PyObjectBase):
|
||||
...
|
||||
|
||||
@overload
|
||||
def __round__(self, /) -> int:
|
||||
...
|
||||
|
||||
def __round__(self, /) -> int: ...
|
||||
@overload
|
||||
def __round__(self, ndigits: int, /) -> float:
|
||||
...
|
||||
def __round__(self, ndigits: int, /) -> float: ...
|
||||
|
||||
@@ -8,7 +8,6 @@ from Vector import Vector
|
||||
from Matrix import Matrix
|
||||
from typing import overload, Tuple, List, Final
|
||||
|
||||
|
||||
@export(
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
|
||||
@@ -6,16 +6,17 @@ from Metadata import export, forward_declarations, constmethod
|
||||
from PyObjectBase import PyObjectBase
|
||||
from typing import List, Final
|
||||
|
||||
|
||||
@export(
|
||||
Twin="BaseType",
|
||||
TwinPointer="BaseType",
|
||||
Delete=True,
|
||||
)
|
||||
@forward_declarations("""
|
||||
@forward_declarations(
|
||||
"""
|
||||
namespace Base {
|
||||
using BaseType = Type;
|
||||
}""")
|
||||
}"""
|
||||
)
|
||||
class Type(PyObjectBase):
|
||||
"""
|
||||
BaseTypePy class.
|
||||
|
||||
@@ -8,7 +8,6 @@ from Quantity import Quantity
|
||||
from Unit import Unit
|
||||
from typing import Final, Tuple, overload
|
||||
|
||||
|
||||
@export(
|
||||
NumberProtocol=True,
|
||||
RichCompare=True,
|
||||
@@ -32,9 +31,7 @@ class Unit(PyObjectBase):
|
||||
"""
|
||||
|
||||
@overload
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
|
||||
def __init__(self) -> None: ...
|
||||
@overload
|
||||
def __init__(
|
||||
self,
|
||||
@@ -46,20 +43,13 @@ class Unit(PyObjectBase):
|
||||
i6: float,
|
||||
i7: float,
|
||||
i8: float,
|
||||
) -> None:
|
||||
...
|
||||
|
||||
) -> None: ...
|
||||
@overload
|
||||
def __init__(self, quantity: Quantity) -> None:
|
||||
...
|
||||
|
||||
def __init__(self, quantity: Quantity) -> None: ...
|
||||
@overload
|
||||
def __init__(self, unit: Unit) -> None:
|
||||
...
|
||||
|
||||
def __init__(self, unit: Unit) -> None: ...
|
||||
@overload
|
||||
def __init__(self, string: str) -> None:
|
||||
...
|
||||
def __init__(self, string: str) -> None: ...
|
||||
|
||||
Type: Final[str] = ...
|
||||
"""holds the unit type as a string, e.g. 'Area'."""
|
||||
|
||||
@@ -6,7 +6,6 @@ from Metadata import export, constmethod, sequence_protocol, class_declarations
|
||||
from PyObjectBase import PyObjectBase
|
||||
from typing import overload, Sequence, TYPE_CHECKING
|
||||
|
||||
|
||||
@export(
|
||||
TwinPointer="Vector3d",
|
||||
Include="Base/Vector3D.h",
|
||||
|
||||
Reference in New Issue
Block a user