[bindings] Format with yapf (precommit will reformat)
This commit is contained in:
@@ -4,6 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
|
||||
|
||||
class ApplicationDirectories(PyObjectBase):
|
||||
"""
|
||||
Provides access to the directory versioning methods of its C++ counterpart.
|
||||
|
||||
@@ -12,6 +12,7 @@ from Base.Matrix import Matrix
|
||||
from StringHasher import StringHasher
|
||||
from typing import Any, Final
|
||||
|
||||
|
||||
@export(
|
||||
Namespace="Data",
|
||||
Reference=True,
|
||||
@@ -36,18 +37,14 @@ class ComplexGeoData(Persistence):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def getFacesFromSubElement(
|
||||
self,
|
||||
) -> tuple[list[Vector], list[tuple[int, int, int]]]:
|
||||
def getFacesFromSubElement(self, ) -> tuple[list[Vector], list[tuple[int, int, int]]]:
|
||||
"""
|
||||
Return vertexes and faces from a sub-element.
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def getLinesFromSubElement(
|
||||
self,
|
||||
) -> tuple[list[Vector], list[tuple[int, int]]]:
|
||||
def getLinesFromSubElement(self, ) -> tuple[list[Vector], list[tuple[int, int]]]:
|
||||
"""
|
||||
Return vertexes and lines from a sub-element.
|
||||
"""
|
||||
@@ -136,6 +133,7 @@ class ComplexGeoData(Persistence):
|
||||
Return the mapped element name
|
||||
"""
|
||||
...
|
||||
|
||||
BoundBox: Final[BoundBox] = ...
|
||||
"""Get the bounding box (BoundBox) of the complex geometric data."""
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ from PropertyContainer import PropertyContainer
|
||||
from DocumentObject import DocumentObject
|
||||
from typing import Final, Sequence
|
||||
|
||||
|
||||
class Document(PropertyContainer):
|
||||
"""
|
||||
This is the Document class.
|
||||
|
||||
@@ -9,6 +9,7 @@ from DocumentObjectGroup import DocumentObjectGroup
|
||||
from ExtensionContainer import ExtensionContainer
|
||||
from typing import Any, Final, List, Optional, Union, Tuple
|
||||
|
||||
|
||||
class DocumentObject(ExtensionContainer):
|
||||
"""
|
||||
This is the father of all classes handled by the document
|
||||
|
||||
@@ -4,6 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from Extension import Extension
|
||||
|
||||
|
||||
class DocumentObjectExtension(Extension):
|
||||
"""
|
||||
Base class for all document object extensions
|
||||
|
||||
@@ -4,6 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from DocumentObject import DocumentObject
|
||||
|
||||
|
||||
class DocumentObjectGroup(DocumentObject):
|
||||
"""
|
||||
This class handles document objects in group
|
||||
|
||||
@@ -5,6 +5,7 @@ from __future__ import annotations
|
||||
from typing import Final, Any
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
|
||||
|
||||
class Extension(PyObjectBase):
|
||||
"""
|
||||
Base class for all extensions
|
||||
|
||||
@@ -5,6 +5,7 @@ from __future__ import annotations
|
||||
from Base.Metadata import export, constmethod
|
||||
from PropertyContainer import PropertyContainer
|
||||
|
||||
|
||||
@export(
|
||||
Initialization=True,
|
||||
Constructor=True,
|
||||
|
||||
@@ -6,6 +6,7 @@ from DocumentObject import DocumentObject
|
||||
from Base.Placement import Placement
|
||||
from typing import Any, Final, Optional
|
||||
|
||||
|
||||
class GeoFeature(DocumentObject):
|
||||
"""
|
||||
App.GeoFeature class.
|
||||
|
||||
@@ -4,6 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from GroupExtension import GroupExtension
|
||||
|
||||
|
||||
class GeoFeatureGroupExtension(GroupExtension):
|
||||
"""
|
||||
Author: Werner Mayer (wmayer@users.sourceforge.net)
|
||||
|
||||
@@ -6,9 +6,8 @@ from Base.Metadata import export
|
||||
from DocumentObjectExtension import DocumentObjectExtension
|
||||
from typing import Any, List
|
||||
|
||||
@export(
|
||||
Include="App/DocumentObjectGroup.h",
|
||||
)
|
||||
|
||||
@export(Include="App/DocumentObjectGroup.h", )
|
||||
class GroupExtension(DocumentObjectExtension):
|
||||
"""
|
||||
Extension class which allows grouping of document objects
|
||||
|
||||
@@ -6,9 +6,8 @@ from Base.Metadata import export
|
||||
from DocumentObjectExtension import DocumentObjectExtension
|
||||
from typing import Any, Final, List, Tuple, Optional, Union, overload
|
||||
|
||||
@export(
|
||||
Include="App/Link.h",
|
||||
)
|
||||
|
||||
@export(Include="App/Link.h", )
|
||||
class LinkBaseExtension(DocumentObjectExtension):
|
||||
"""
|
||||
Link extension base class
|
||||
@@ -57,11 +56,17 @@ class LinkBaseExtension(DocumentObjectExtension):
|
||||
...
|
||||
|
||||
@overload
|
||||
def getLinkPropertyInfo(self, /) -> tuple: ...
|
||||
def getLinkPropertyInfo(self, /) -> tuple:
|
||||
...
|
||||
|
||||
@overload
|
||||
def getLinkPropertyInfo(self, index: int, /) -> tuple: ...
|
||||
def getLinkPropertyInfo(self, index: int, /) -> tuple:
|
||||
...
|
||||
|
||||
@overload
|
||||
def getLinkPropertyInfo(self, name: str, /) -> tuple: ...
|
||||
def getLinkPropertyInfo(self, name: str, /) -> tuple:
|
||||
...
|
||||
|
||||
def getLinkPropertyInfo(self, arg: Any = None, /) -> tuple:
|
||||
"""
|
||||
getLinkPropertyInfo(): return a tuple of (name,type,doc) for all supported properties.
|
||||
|
||||
@@ -6,15 +6,14 @@ from Base.Metadata import export, class_declarations
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import Any, overload
|
||||
|
||||
|
||||
@export(
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
)
|
||||
@class_declarations(
|
||||
"""public:
|
||||
@class_declarations("""public:
|
||||
static Base::Color toColor(PyObject* value);
|
||||
"""
|
||||
)
|
||||
""")
|
||||
class Material(PyObjectBase):
|
||||
"""
|
||||
App.Material class.
|
||||
|
||||
@@ -8,6 +8,7 @@ from typing import List, Tuple, TypeAlias
|
||||
|
||||
MeasureType: TypeAlias = object
|
||||
|
||||
|
||||
@export(
|
||||
Constructor=False,
|
||||
Delete=True,
|
||||
|
||||
@@ -6,6 +6,7 @@ from Base.Metadata import export, class_declarations
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import Any, List, Dict, overload, Optional
|
||||
|
||||
|
||||
@export(
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
@@ -52,13 +53,20 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
|
||||
@overload
|
||||
def __init__(self) -> None: ...
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
|
||||
@overload
|
||||
def __init__(self, metadata: "Metadata") -> None: ...
|
||||
def __init__(self, metadata: "Metadata") -> None:
|
||||
...
|
||||
|
||||
@overload
|
||||
def __init__(self, file: str) -> None: ...
|
||||
def __init__(self, file: str) -> None:
|
||||
...
|
||||
|
||||
@overload
|
||||
def __init__(self, bytes: bytes) -> None: ...
|
||||
def __init__(self, bytes: bytes) -> None:
|
||||
...
|
||||
|
||||
Name: str = ""
|
||||
"""String representing the name of this item."""
|
||||
|
||||
@@ -4,6 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from GeoFeatureGroupExtension import GeoFeatureGroupExtension
|
||||
|
||||
|
||||
class OriginGroupExtension(GeoFeatureGroupExtension):
|
||||
"""
|
||||
Author: Alexander Golubev (fatzer2@gmail.com)
|
||||
|
||||
@@ -4,6 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from GeoFeature import GeoFeature
|
||||
|
||||
|
||||
class Part(GeoFeature):
|
||||
"""
|
||||
Author: Juergen Riegel (FreeCAD@juergen-riegel.net)
|
||||
|
||||
@@ -6,9 +6,8 @@ from Base.Metadata import export, constmethod
|
||||
from Base.Persistence import Persistence
|
||||
from typing import Any, Final, Union, List, Optional
|
||||
|
||||
@export(
|
||||
DisableNotify=True,
|
||||
)
|
||||
|
||||
@export(DisableNotify=True, )
|
||||
class PropertyContainer(Persistence):
|
||||
"""
|
||||
App.PropertyContainer class.
|
||||
|
||||
@@ -6,6 +6,7 @@ from Base.Metadata import export, constmethod
|
||||
from Base.BaseClass import BaseClass
|
||||
from typing import Any, Final, overload, Dict
|
||||
|
||||
|
||||
@export(
|
||||
Constructor=True,
|
||||
Reference=True,
|
||||
@@ -19,9 +20,13 @@ class StringHasher(BaseClass):
|
||||
"""
|
||||
|
||||
@overload
|
||||
def getID(self, txt: str, base64: bool = False, /) -> Any: ...
|
||||
def getID(self, txt: str, base64: bool = False, /) -> Any:
|
||||
...
|
||||
|
||||
@overload
|
||||
def getID(self, id: int, base64: bool = False, /) -> Any: ...
|
||||
def getID(self, id: int, base64: bool = False, /) -> Any:
|
||||
...
|
||||
|
||||
def getID(self, arg: Any, base64: bool = False, /) -> Any:
|
||||
"""
|
||||
getID(txt|id, base64=False) -> StringID
|
||||
|
||||
@@ -6,16 +6,15 @@ from Base.Metadata import export, constmethod, class_declarations
|
||||
from Base.BaseClass import BaseClass
|
||||
from typing import Any, Final, List
|
||||
|
||||
|
||||
@export(
|
||||
Include="App/StringHasher.h",
|
||||
Reference=True,
|
||||
)
|
||||
@class_declarations(
|
||||
"""private:
|
||||
@class_declarations("""private:
|
||||
friend class StringID;
|
||||
int _index = 0;
|
||||
"""
|
||||
)
|
||||
""")
|
||||
class StringID(BaseClass):
|
||||
"""
|
||||
This is the StringID class
|
||||
@@ -30,6 +29,7 @@ class StringID(BaseClass):
|
||||
Check if two StringIDs are the same
|
||||
"""
|
||||
...
|
||||
|
||||
Value: Final[int] = 0
|
||||
"""Return the integer value of this ID"""
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from DocumentObjectExtension import DocumentObjectExtension
|
||||
|
||||
|
||||
class SuppressibleExtension(DocumentObjectExtension):
|
||||
"""
|
||||
Author: Florian Foinant-Willig (flachyjoe@users.sourceforge.net)
|
||||
|
||||
Reference in New Issue
Block a user