[bindings] fix signatures in pyi files
This commit is contained in:
@@ -13,7 +13,7 @@ class ApplicationDirectories(PyObjectBase):
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
def usingCurrentVersionConfig(path: str) -> bool:
|
||||
def usingCurrentVersionConfig(path: str, /) -> bool:
|
||||
"""
|
||||
Determine if a given config path is for the current version of the program.
|
||||
|
||||
@@ -23,7 +23,7 @@ class ApplicationDirectories(PyObjectBase):
|
||||
...
|
||||
|
||||
@staticmethod
|
||||
def migrateAllPaths(paths: list[str]) -> None:
|
||||
def migrateAllPaths(paths: list[str], /) -> None:
|
||||
"""
|
||||
Migrate a set of versionable configuration directories from the given paths to a new version.
|
||||
|
||||
@@ -47,7 +47,7 @@ class ApplicationDirectories(PyObjectBase):
|
||||
...
|
||||
|
||||
@staticmethod
|
||||
def versionStringForPath(major: int, minor: int) -> str:
|
||||
def versionStringForPath(major: int, minor: int, /) -> str:
|
||||
"""
|
||||
Given a major and minor version number.
|
||||
|
||||
@@ -62,7 +62,7 @@ class ApplicationDirectories(PyObjectBase):
|
||||
...
|
||||
|
||||
@staticmethod
|
||||
def isVersionedPath(startingPath: str) -> bool:
|
||||
def isVersionedPath(startingPath: str, /) -> bool:
|
||||
"""
|
||||
Determine if a given path is versioned.
|
||||
|
||||
@@ -80,7 +80,7 @@ class ApplicationDirectories(PyObjectBase):
|
||||
...
|
||||
|
||||
@staticmethod
|
||||
def mostRecentAvailableConfigVersion(startingPath: str) -> str:
|
||||
def mostRecentAvailableConfigVersion(startingPath: str, /) -> str:
|
||||
"""
|
||||
Given a base path that is expected to contain versioned subdirectories, locate the
|
||||
directory name (*not* the path, only the final component, the version string itself)
|
||||
@@ -97,7 +97,7 @@ class ApplicationDirectories(PyObjectBase):
|
||||
...
|
||||
|
||||
@staticmethod
|
||||
def mostRecentConfigFromBase(startingPath: str) -> str:
|
||||
def mostRecentConfigFromBase(startingPath: str, /) -> str:
|
||||
"""
|
||||
Given a base path that is expected to contained versioned subdirectories, locate the
|
||||
directory corresponding to the most recent version of the software, up to and including
|
||||
@@ -113,7 +113,7 @@ class ApplicationDirectories(PyObjectBase):
|
||||
...
|
||||
|
||||
@staticmethod
|
||||
def migrateConfig(oldPath: str, newPath: str) -> None:
|
||||
def migrateConfig(oldPath: str, newPath: str, /) -> None:
|
||||
"""
|
||||
A utility method to copy all files and directories from oldPath to newPath, handling the
|
||||
case where newPath might itself be a subdirectory of oldPath (and *not* attempting that
|
||||
|
||||
@@ -74,19 +74,19 @@ class ComplexGeoData(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def applyTranslation(self, translation: Vector) -> None:
|
||||
def applyTranslation(self, translation: Vector, /) -> None:
|
||||
"""
|
||||
Apply an additional translation to the placement
|
||||
"""
|
||||
...
|
||||
|
||||
def applyRotation(self, rotation: Rotation) -> None:
|
||||
def applyRotation(self, rotation: Rotation, /) -> None:
|
||||
"""
|
||||
Apply an additional rotation to the placement
|
||||
"""
|
||||
...
|
||||
|
||||
def transformGeometry(self, transformation: Matrix) -> None:
|
||||
def transformGeometry(self, transformation: Matrix, /) -> None:
|
||||
"""
|
||||
Apply a transformation to the underlying geometry
|
||||
"""
|
||||
@@ -117,21 +117,21 @@ class ComplexGeoData(Persistence):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def getElementName(self, name: str, direction: int = 0) -> str:
|
||||
def getElementName(self, name: str, direction: int = 0, /) -> str:
|
||||
"""
|
||||
Return a mapped element name or reverse.
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def getElementIndexedName(self, name: str) -> str | tuple[str, list[int]]:
|
||||
def getElementIndexedName(self, name: str, /) -> str | tuple[str, list[int]]:
|
||||
"""
|
||||
Return the indexed element name.
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def getElementMappedName(self, name: str) -> str | tuple[str, list[int]]:
|
||||
def getElementMappedName(self, name: str, /) -> str | tuple[str, list[int]]:
|
||||
"""
|
||||
Return the mapped element name
|
||||
"""
|
||||
|
||||
@@ -89,19 +89,19 @@ class Document(PropertyContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def saveAs(self, path: str) -> None:
|
||||
def saveAs(self, path: str, /) -> None:
|
||||
"""
|
||||
Save the document under a new name to disk.
|
||||
"""
|
||||
...
|
||||
|
||||
def saveCopy(self, path: str) -> None:
|
||||
def saveCopy(self, path: str, /) -> None:
|
||||
"""
|
||||
Save a copy of the document under a new name to disk.
|
||||
"""
|
||||
...
|
||||
|
||||
def load(self, path: str) -> None:
|
||||
def load(self, path: str, /) -> None:
|
||||
"""
|
||||
Load the document from the given path.
|
||||
"""
|
||||
@@ -132,7 +132,7 @@ class Document(PropertyContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def getUniqueObjectName(self, objName: str) -> str:
|
||||
def getUniqueObjectName(self, objName: str, /) -> str:
|
||||
"""
|
||||
Return the same name, or the name made unique, for Example Box -> Box002 if there are conflicting name
|
||||
already in the document.
|
||||
@@ -145,13 +145,13 @@ class Document(PropertyContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def mergeProject(self, path: str) -> None:
|
||||
def mergeProject(self, path: str, /) -> None:
|
||||
"""
|
||||
Merges this document with another project file.
|
||||
"""
|
||||
...
|
||||
|
||||
def exportGraphviz(self, path: str = None) -> str | None:
|
||||
def exportGraphviz(self, path: str = None, /) -> str | None:
|
||||
"""
|
||||
Export the dependencies of the objects as graph.
|
||||
|
||||
@@ -159,7 +159,7 @@ class Document(PropertyContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def openTransaction(self, name: str) -> None:
|
||||
def openTransaction(self, name: str, /) -> None:
|
||||
"""
|
||||
Open a new Undo/Redo transaction.
|
||||
|
||||
@@ -185,7 +185,6 @@ class Document(PropertyContainer):
|
||||
|
||||
def addObject(
|
||||
self,
|
||||
*,
|
||||
type: str,
|
||||
name: str = None,
|
||||
objProxy: object = None,
|
||||
@@ -210,7 +209,6 @@ class Document(PropertyContainer):
|
||||
|
||||
def addProperty(
|
||||
self,
|
||||
*,
|
||||
type: str,
|
||||
name: str,
|
||||
group: str = "",
|
||||
@@ -219,7 +217,8 @@ class Document(PropertyContainer):
|
||||
read_only: bool = False,
|
||||
hidden: bool = False,
|
||||
locked: bool = False,
|
||||
) -> Document:
|
||||
enum_vals: list[str] | None = None,
|
||||
) -> Document:
|
||||
"""
|
||||
Add a generic property.
|
||||
|
||||
@@ -238,7 +237,7 @@ class Document(PropertyContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeProperty(self, name: str) -> None:
|
||||
def removeProperty(self, name: str, /) -> None:
|
||||
"""
|
||||
Remove a generic property.
|
||||
|
||||
@@ -246,7 +245,7 @@ class Document(PropertyContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeObject(self, name: str) -> None:
|
||||
def removeObject(self, name: str, /) -> None:
|
||||
"""
|
||||
Remove an object from the document.
|
||||
"""
|
||||
@@ -271,7 +270,10 @@ class Document(PropertyContainer):
|
||||
...
|
||||
|
||||
def moveObject(
|
||||
self, object: DocumentObject, with_dependencies: bool = False
|
||||
self,
|
||||
object: DocumentObject,
|
||||
with_dependencies: bool = False,
|
||||
/,
|
||||
) -> DocumentObject:
|
||||
"""
|
||||
Transfers an object from another document to this document.
|
||||
@@ -283,7 +285,9 @@ class Document(PropertyContainer):
|
||||
...
|
||||
|
||||
def importLinks(
|
||||
self, object: DocumentObject = None
|
||||
self,
|
||||
object: DocumentObject = None,
|
||||
/,
|
||||
) -> tuple[DocumentObject, ...]:
|
||||
"""
|
||||
Import any externally linked object given a list of objects in
|
||||
@@ -319,7 +323,7 @@ class Document(PropertyContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def setClosable(self, closable: bool) -> None:
|
||||
def setClosable(self, closable: bool, /) -> None:
|
||||
"""
|
||||
Set a flag that allows or forbids to close a document
|
||||
"""
|
||||
@@ -331,7 +335,7 @@ class Document(PropertyContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def setAutoCreated(self, autoCreated: bool) -> None:
|
||||
def setAutoCreated(self, autoCreated: bool, /) -> None:
|
||||
"""
|
||||
Set a flag that indicates if a document is autoCreated
|
||||
"""
|
||||
@@ -348,6 +352,7 @@ class Document(PropertyContainer):
|
||||
objs: Sequence[DocumentObject] = None,
|
||||
force: bool = False,
|
||||
check_cycle: bool = False,
|
||||
/,
|
||||
) -> int:
|
||||
"""
|
||||
Recompute the document and returns the amount of recomputed features.
|
||||
@@ -372,13 +377,13 @@ class Document(PropertyContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def getObject(self, name: str) -> DocumentObject:
|
||||
def getObject(self, name: str, /) -> DocumentObject:
|
||||
"""
|
||||
Return the object with the given name
|
||||
"""
|
||||
...
|
||||
|
||||
def getObjectsByLabel(self, label: str) -> list[DocumentObject]:
|
||||
def getObjectsByLabel(self, label: str, /) -> list[DocumentObject]:
|
||||
"""
|
||||
Return the objects with the given label name.
|
||||
|
||||
@@ -388,7 +393,6 @@ class Document(PropertyContainer):
|
||||
|
||||
def findObjects(
|
||||
self,
|
||||
*,
|
||||
Type: str = None,
|
||||
Name: str = None,
|
||||
Label: str = None,
|
||||
@@ -410,6 +414,7 @@ class Document(PropertyContainer):
|
||||
obj: DocumentObject,
|
||||
options: int = 0,
|
||||
maxCount: int = 0,
|
||||
/,
|
||||
) -> tuple[DocumentObject, ...]:
|
||||
"""
|
||||
Return objects linked to 'obj'
|
||||
@@ -432,7 +437,7 @@ class Document(PropertyContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def getDependentDocuments(self, sort: bool = True) -> list[DocumentObject]:
|
||||
def getDependentDocuments(self, sort: bool = True, /) -> list[DocumentObject]:
|
||||
"""
|
||||
Returns a list of documents that this document directly or indirectly links to including itself.
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import constmethod
|
||||
from Base.Matrix import Matrix
|
||||
from Document import Document
|
||||
@@ -79,7 +83,7 @@ class DocumentObject(ExtensionContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeProperty(self, string: str) -> None:
|
||||
def removeProperty(self, string: str, /) -> None:
|
||||
"""
|
||||
removeProperty(string) -- Remove a generic property.
|
||||
|
||||
@@ -111,26 +115,26 @@ class DocumentObject(ExtensionContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def setExpression(self, name: str, expression: str) -> None:
|
||||
def setExpression(self, name: str, expression: str, /) -> None:
|
||||
"""
|
||||
Register an expression for a property
|
||||
"""
|
||||
...
|
||||
|
||||
def clearExpression(self, name: str) -> None:
|
||||
def clearExpression(self, name: str, /) -> None:
|
||||
"""
|
||||
Clear the expression for a property
|
||||
"""
|
||||
...
|
||||
|
||||
@classmethod
|
||||
def evalExpression(cls, expression: str) -> Any:
|
||||
def evalExpression(cls, expression: str, /) -> Any:
|
||||
"""
|
||||
Evaluate an expression
|
||||
"""
|
||||
...
|
||||
|
||||
def recompute(self, recursive: bool = False) -> None:
|
||||
def recompute(self, recursive: bool = False, /) -> None:
|
||||
"""
|
||||
recompute(recursive=False): Recomputes this object
|
||||
"""
|
||||
@@ -191,7 +195,7 @@ class DocumentObject(ExtensionContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def getSubObjectList(self, subname: str) -> list:
|
||||
def getSubObjectList(self, subname: str, /) -> list:
|
||||
"""
|
||||
getSubObjectList(subname)
|
||||
|
||||
@@ -199,7 +203,7 @@ class DocumentObject(ExtensionContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def getSubObjects(self, reason: int = 0) -> list:
|
||||
def getSubObjects(self, reason: int = 0, /) -> list:
|
||||
"""
|
||||
getSubObjects(reason=0): Return subname reference of all sub-objects
|
||||
"""
|
||||
@@ -229,14 +233,14 @@ class DocumentObject(ExtensionContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def setElementVisible(self, element: str, visible: bool) -> int:
|
||||
def setElementVisible(self, element: str, visible: bool, /) -> int:
|
||||
"""
|
||||
setElementVisible(element,visible): Set the visibility of a child element
|
||||
Return -1 if element visibility is not supported, 0 if element not found, 1 if success
|
||||
"""
|
||||
...
|
||||
|
||||
def isElementVisible(self, element: str) -> int:
|
||||
def isElementVisible(self, element: str, /) -> int:
|
||||
"""
|
||||
isElementVisible(element): Check if a child element is visible
|
||||
Return -1 if element visibility is not supported or element not found, 0 if invisible, or else 1
|
||||
@@ -283,7 +287,7 @@ class DocumentObject(ExtensionContainer):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def resolve(self, subname: str) -> tuple:
|
||||
def resolve(self, subname: str, /) -> tuple:
|
||||
"""
|
||||
resolve(subname) -- resolve the sub object
|
||||
|
||||
@@ -296,7 +300,7 @@ class DocumentObject(ExtensionContainer):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def resolveSubElement(self, subname: str, append: bool, type: int) -> tuple:
|
||||
def resolveSubElement(self, subname: str, append: bool, type: int, /) -> tuple:
|
||||
"""
|
||||
resolveSubElement(subname,append,type) -- resolve both new and old style sub element
|
||||
|
||||
@@ -308,14 +312,14 @@ class DocumentObject(ExtensionContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def adjustRelativeLinks(self, parent: DocumentObject, recursive: bool = True) -> bool:
|
||||
def adjustRelativeLinks(self, parent: DocumentObject, recursive: bool = True, /) -> bool:
|
||||
"""
|
||||
adjustRelativeLinks(parent,recursive=True) -- auto correct potential cyclic dependencies
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def getElementMapVersion(self, property_name: str) -> str:
|
||||
def getElementMapVersion(self, property_name: str, /) -> str:
|
||||
"""
|
||||
getElementMapVersion(property_name): return element map version of a given geometry property
|
||||
"""
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Extension import Extension
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from DocumentObject import DocumentObject
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Final, Any
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, constmethod
|
||||
from PropertyContainer import PropertyContainer
|
||||
|
||||
@@ -13,14 +17,14 @@ class ExtensionContainer(PropertyContainer):
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def addExtension(self, identifier: str) -> None:
|
||||
def addExtension(self, identifier: str, /) -> None:
|
||||
"""
|
||||
Adds an extension to the object. Requires the string identifier for the python extension as argument
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def hasExtension(self, identifier: str) -> bool:
|
||||
def hasExtension(self, identifier: str, /) -> bool:
|
||||
"""
|
||||
Returns if this object has the specified extension
|
||||
"""
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from DocumentObject import DocumentObject
|
||||
from Base import Placement
|
||||
from typing import Any, Final, Optional
|
||||
@@ -39,7 +43,7 @@ class GeoFeature(DocumentObject):
|
||||
...
|
||||
|
||||
@staticmethod
|
||||
def getGlobalPlacementOf(targetObj: Any, rootObj: Any, subname: str) -> Placement:
|
||||
def getGlobalPlacementOf(targetObj: Any, rootObj: Any, subname: str, /) -> Placement:
|
||||
"""
|
||||
getGlobalPlacementOf(targetObj, rootObj, subname) -> Base.Placement
|
||||
Selection example: obj = "part1" sub = "linkToPart2.LinkToBody.Pad.face1"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from GroupExtension import GroupExtension
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
from DocumentObjectExtension import DocumentObjectExtension
|
||||
from typing import Any, List
|
||||
@@ -13,37 +17,37 @@ class GroupExtension(DocumentObjectExtension):
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def newObject(self, type: str, name: str) -> Any:
|
||||
def newObject(self, type: str, name: str, /) -> Any:
|
||||
"""
|
||||
Create and add an object with given type and name to the group
|
||||
"""
|
||||
...
|
||||
|
||||
def addObject(self, obj: Any) -> List[Any]:
|
||||
def addObject(self, obj: Any, /) -> List[Any]:
|
||||
"""
|
||||
Add an object to the group. Returns all objects that have been added.
|
||||
"""
|
||||
...
|
||||
|
||||
def addObjects(self, objects: List[Any]) -> List[Any]:
|
||||
def addObjects(self, objects: List[Any], /) -> List[Any]:
|
||||
"""
|
||||
Adds multiple objects to the group. Expects a list and returns all objects that have been added.
|
||||
"""
|
||||
...
|
||||
|
||||
def setObjects(self, objects: List[Any]) -> List[Any]:
|
||||
def setObjects(self, objects: List[Any], /) -> List[Any]:
|
||||
"""
|
||||
Sets the objects of the group. Expects a list and returns all objects that are now in the group.
|
||||
"""
|
||||
...
|
||||
|
||||
def removeObject(self, obj: Any) -> List[Any]:
|
||||
def removeObject(self, obj: Any, /) -> List[Any]:
|
||||
"""
|
||||
Remove an object from the group and returns all objects that have been removed.
|
||||
"""
|
||||
...
|
||||
|
||||
def removeObjects(self, objects: List[Any]) -> List[Any]:
|
||||
def removeObjects(self, objects: List[Any], /) -> List[Any]:
|
||||
"""
|
||||
Remove multiple objects from the group. Expects a list and returns all objects that have been removed.
|
||||
"""
|
||||
@@ -55,20 +59,20 @@ class GroupExtension(DocumentObjectExtension):
|
||||
"""
|
||||
...
|
||||
|
||||
def getObject(self, name: str) -> Any:
|
||||
def getObject(self, name: str, /) -> Any:
|
||||
"""
|
||||
Return the object with the given name
|
||||
"""
|
||||
...
|
||||
|
||||
def getObjectsOfType(self, typename: str) -> List[Any]:
|
||||
def getObjectsOfType(self, typename: str, /) -> List[Any]:
|
||||
"""
|
||||
Returns all object in the group of given type
|
||||
@param typename The Freecad type identifier
|
||||
"""
|
||||
...
|
||||
|
||||
def hasObject(self, obj: Any, recursive: bool = False) -> bool:
|
||||
def hasObject(self, obj: Any, recursive: bool = False, /) -> bool:
|
||||
"""
|
||||
hasObject(obj, recursive=false)
|
||||
|
||||
@@ -78,7 +82,7 @@ class GroupExtension(DocumentObjectExtension):
|
||||
"""
|
||||
...
|
||||
|
||||
def allowObject(self, obj: Any) -> bool:
|
||||
def allowObject(self, obj: Any, /) -> bool:
|
||||
"""
|
||||
Returns true if obj is allowed in the group extension.
|
||||
"""
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
from DocumentObjectExtension import DocumentObjectExtension
|
||||
from typing import Any, Final, List, Tuple, Optional, Union, overload
|
||||
@@ -41,31 +45,31 @@ class LinkBaseExtension(DocumentObjectExtension):
|
||||
"""
|
||||
...
|
||||
|
||||
def getLinkExtProperty(self, name: str) -> Any:
|
||||
def getLinkExtProperty(self, name: str, /) -> Any:
|
||||
"""
|
||||
getLinkExtProperty(name): return the property value by its predefined name
|
||||
"""
|
||||
...
|
||||
|
||||
def getLinkExtPropertyName(self, name: str) -> str:
|
||||
def getLinkExtPropertyName(self, name: str, /) -> str:
|
||||
"""
|
||||
getLinkExtPropertyName(name): lookup the property name by its predefined name
|
||||
"""
|
||||
...
|
||||
|
||||
@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:
|
||||
def getLinkPropertyInfo(self, arg: Any = None, /) -> tuple:
|
||||
"""
|
||||
getLinkPropertyInfo(): return a tuple of (name,type,doc) for all supported properties.
|
||||
|
||||
@@ -75,7 +79,7 @@ class LinkBaseExtension(DocumentObjectExtension):
|
||||
"""
|
||||
...
|
||||
|
||||
def setLink(self, obj: Any, subName: Optional[str] = None, subElements: Optional[Union[str, Tuple[str, ...]]] = None) -> None:
|
||||
def setLink(self, obj: Any, subName: Optional[str] = None, subElements: Optional[Union[str, Tuple[str, ...]]] = None, /) -> None:
|
||||
"""
|
||||
setLink(obj,subName=None,subElements=None): Set link object.
|
||||
|
||||
@@ -92,7 +96,7 @@ class LinkBaseExtension(DocumentObjectExtension):
|
||||
"""
|
||||
...
|
||||
|
||||
def cacheChildLabel(self, enable: bool = True) -> None:
|
||||
def cacheChildLabel(self, enable: bool = True, /) -> None:
|
||||
"""
|
||||
cacheChildLabel(enable=True): enable/disable child label cache
|
||||
|
||||
@@ -101,7 +105,7 @@ class LinkBaseExtension(DocumentObjectExtension):
|
||||
"""
|
||||
...
|
||||
|
||||
def flattenSubname(self, subname: str) -> str:
|
||||
def flattenSubname(self, subname: str, /) -> str:
|
||||
"""
|
||||
flattenSubname(subname) -> string
|
||||
|
||||
@@ -109,7 +113,7 @@ class LinkBaseExtension(DocumentObjectExtension):
|
||||
"""
|
||||
...
|
||||
|
||||
def expandSubname(self, subname: str) -> str:
|
||||
def expandSubname(self, subname: str, /) -> str:
|
||||
"""
|
||||
expandSubname(subname) -> string
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, class_declarations
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import Any, overload
|
||||
@@ -25,7 +29,7 @@ class Material(PyObjectBase):
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
||||
...
|
||||
|
||||
def set(self, string: str) -> None:
|
||||
def set(self, string: str, /) -> None:
|
||||
"""
|
||||
Set(string) -- Set the material.
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, no_args
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import List, Tuple, TypeAlias
|
||||
@@ -21,7 +25,7 @@ class MeasureManager(PyObjectBase):
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
def addMeasureType(id: str, label: str, measureType: MeasureType) -> None:
|
||||
def addMeasureType(id: str, label: str, measureType: MeasureType, /) -> None:
|
||||
"""
|
||||
addMeasureType(id, label, measureType) -> None
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, class_declarations
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import Any, List, Dict, overload, Optional
|
||||
@@ -217,7 +221,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def getGenericMetadata(self, name: str) -> List[Any]:
|
||||
def getGenericMetadata(self, name: str, /) -> List[Any]:
|
||||
"""
|
||||
getGenericMetadata(name) -> list
|
||||
|
||||
@@ -228,7 +232,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def addContentItem(self, content_type: str, metadata: "Metadata") -> None:
|
||||
def addContentItem(self, content_type: str, metadata: "Metadata", /) -> None:
|
||||
"""
|
||||
addContentItem(content_type,metadata)
|
||||
|
||||
@@ -236,7 +240,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeContentItem(self, content_type: str, name: str) -> None:
|
||||
def removeContentItem(self, content_type: str, name: str, /) -> None:
|
||||
"""
|
||||
removeContentItem(content_type,name)
|
||||
|
||||
@@ -244,7 +248,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def addMaintainer(self, name: str, email: str) -> None:
|
||||
def addMaintainer(self, name: str, email: str, /) -> None:
|
||||
"""
|
||||
addMaintainer(name, email)
|
||||
|
||||
@@ -252,7 +256,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeMaintainer(self, name: str, email: str) -> None:
|
||||
def removeMaintainer(self, name: str, email: str, /) -> None:
|
||||
"""
|
||||
removeMaintainer(name, email)
|
||||
|
||||
@@ -260,7 +264,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def addLicense(self, short_code: str, path: str) -> None:
|
||||
def addLicense(self, short_code: str, path: str, /) -> None:
|
||||
"""
|
||||
addLicense(short_code,path)
|
||||
|
||||
@@ -268,7 +272,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeLicense(self, short_code: str) -> None:
|
||||
def removeLicense(self, short_code: str, /) -> None:
|
||||
"""
|
||||
removeLicense(short_code)
|
||||
|
||||
@@ -276,7 +280,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def addUrl(self, url_type: str, url: str, branch: str) -> None:
|
||||
def addUrl(self, url_type: str, url: str, branch: str, /) -> None:
|
||||
"""
|
||||
addUrl(url_type,url,branch)
|
||||
|
||||
@@ -288,7 +292,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeUrl(self, url_type: str, url: str) -> None:
|
||||
def removeUrl(self, url_type: str, url: str, /) -> None:
|
||||
"""
|
||||
removeUrl(url_type,url)
|
||||
|
||||
@@ -296,7 +300,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def addAuthor(self, name: str, email: str) -> None:
|
||||
def addAuthor(self, name: str, email: str, /) -> None:
|
||||
"""
|
||||
addAuthor(name, email)
|
||||
|
||||
@@ -304,7 +308,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeAuthor(self, name: str, email: str) -> None:
|
||||
def removeAuthor(self, name: str, email: str, /) -> None:
|
||||
"""
|
||||
removeAuthor(name, email)
|
||||
|
||||
@@ -312,7 +316,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def addDepend(self, name: str, kind: str, optional: bool) -> None:
|
||||
def addDepend(self, name: str, kind: str, optional: bool, /) -> None:
|
||||
"""
|
||||
addDepend(name, kind, optional)
|
||||
|
||||
@@ -322,7 +326,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeDepend(self, name: str, kind: str) -> None:
|
||||
def removeDepend(self, name: str, kind: str, /) -> None:
|
||||
"""
|
||||
removeDepend(name, kind)
|
||||
|
||||
@@ -332,7 +336,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def addConflict(self, name: str, kind: str) -> None:
|
||||
def addConflict(self, name: str, kind: str, /) -> None:
|
||||
"""
|
||||
addConflict(name, kind)
|
||||
|
||||
@@ -340,7 +344,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeConflict(self, name: str, kind: str) -> None:
|
||||
def removeConflict(self, name: str, kind: str, /) -> None:
|
||||
"""
|
||||
removeConflict(name, kind)
|
||||
|
||||
@@ -348,7 +352,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def addReplace(self, name: str) -> None:
|
||||
def addReplace(self, name: str, /) -> None:
|
||||
"""
|
||||
addReplace(name)
|
||||
|
||||
@@ -356,7 +360,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeReplace(self, name: str) -> None:
|
||||
def removeReplace(self, name: str, /) -> None:
|
||||
"""
|
||||
removeReplace(name)
|
||||
|
||||
@@ -364,7 +368,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def addTag(self, tag: str) -> None:
|
||||
def addTag(self, tag: str, /) -> None:
|
||||
"""
|
||||
addTag(tag)
|
||||
|
||||
@@ -372,7 +376,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeTag(self, tag: str) -> None:
|
||||
def removeTag(self, tag: str, /) -> None:
|
||||
"""
|
||||
removeTag(tag)
|
||||
|
||||
@@ -380,7 +384,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def addFile(self, filename: str) -> None:
|
||||
def addFile(self, filename: str, /) -> None:
|
||||
"""
|
||||
addFile(filename)
|
||||
|
||||
@@ -388,7 +392,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeFile(self, filename: str) -> None:
|
||||
def removeFile(self, filename: str, /) -> None:
|
||||
"""
|
||||
removeFile(filename)
|
||||
|
||||
@@ -396,7 +400,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def write(self, filename: str) -> None:
|
||||
def write(self, filename: str, /) -> None:
|
||||
"""
|
||||
write(filename)
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from GeoFeatureGroupExtension import GeoFeatureGroupExtension
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from GeoFeature import GeoFeature
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.Persistence import Persistence
|
||||
from typing import Any, Final, Union, List, Optional
|
||||
@@ -14,7 +18,7 @@ class PropertyContainer(Persistence):
|
||||
PropertiesList: Final[list] = []
|
||||
"""A list of all property names."""
|
||||
|
||||
def getPropertyByName(self, name: str, checkOwner: int = 0) -> Any:
|
||||
def getPropertyByName(self, name: str, checkOwner: int = 0, /) -> Any:
|
||||
"""
|
||||
getPropertyByName(name, checkOwner=0) -> object or Tuple
|
||||
|
||||
@@ -30,7 +34,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def getPropertyTouchList(self, name: str) -> tuple:
|
||||
def getPropertyTouchList(self, name: str, /) -> tuple:
|
||||
"""
|
||||
getPropertyTouchList(name) -> tuple
|
||||
|
||||
@@ -41,7 +45,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def getTypeOfProperty(self, name: str) -> list:
|
||||
def getTypeOfProperty(self, name: str, /) -> list:
|
||||
"""
|
||||
getTypeOfProperty(name) -> list
|
||||
|
||||
@@ -53,7 +57,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def getTypeIdOfProperty(self, name: str) -> str:
|
||||
def getTypeIdOfProperty(self, name: str, /) -> str:
|
||||
"""
|
||||
getTypeIdOfProperty(name) -> str
|
||||
|
||||
@@ -64,7 +68,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def setEditorMode(self, name: str, type: Union[int, List[str]]) -> None:
|
||||
def setEditorMode(self, name: str, type: Union[int, List[str]], /) -> None:
|
||||
"""
|
||||
setEditorMode(name, type) -> None
|
||||
|
||||
@@ -79,7 +83,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def getEditorMode(self, name: str) -> list:
|
||||
def getEditorMode(self, name: str, /) -> list:
|
||||
"""
|
||||
getEditorMode(name) -> list
|
||||
|
||||
@@ -95,7 +99,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def getGroupOfProperty(self, name: str) -> str:
|
||||
def getGroupOfProperty(self, name: str, /) -> str:
|
||||
"""
|
||||
getGroupOfProperty(name) -> str
|
||||
|
||||
@@ -107,7 +111,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def setGroupOfProperty(self, name: str, group: str) -> None:
|
||||
def setGroupOfProperty(self, name: str, group: str, /) -> None:
|
||||
"""
|
||||
setGroupOfProperty(name, group) -> None
|
||||
|
||||
@@ -121,8 +125,7 @@ class PropertyContainer(Persistence):
|
||||
...
|
||||
|
||||
def setPropertyStatus(
|
||||
self, name: str, val: Union[int, str, List[Union[str, int]]]
|
||||
) -> None:
|
||||
self, name: str, val: Union[int, str, List[Union[str, int]]], /) -> None:
|
||||
"""
|
||||
setPropertyStatus(name, val) -> None
|
||||
|
||||
@@ -136,7 +139,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def getPropertyStatus(self, name: str = "") -> list:
|
||||
def getPropertyStatus(self, name: str = "", /) -> list:
|
||||
"""
|
||||
getPropertyStatus(name='') -> list
|
||||
|
||||
@@ -147,7 +150,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def getDocumentationOfProperty(self, name: str) -> str:
|
||||
def getDocumentationOfProperty(self, name: str, /) -> str:
|
||||
"""
|
||||
getDocumentationOfProperty(name) -> str
|
||||
|
||||
@@ -158,7 +161,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def setDocumentationOfProperty(self, name: str, docstring: str) -> None:
|
||||
def setDocumentationOfProperty(self, name: str, docstring: str, /) -> None:
|
||||
"""
|
||||
setDocumentationOfProperty(name, docstring) -> None
|
||||
|
||||
@@ -171,7 +174,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def getEnumerationsOfProperty(self, name: str) -> Optional[list]:
|
||||
def getEnumerationsOfProperty(self, name: str, /) -> Optional[list]:
|
||||
"""
|
||||
getEnumerationsOfProperty(name) -> list or None
|
||||
|
||||
@@ -198,7 +201,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def restorePropertyContent(self, name: str, obj: object) -> None:
|
||||
def restorePropertyContent(self, name: str, obj: object, /) -> None:
|
||||
"""
|
||||
restorePropertyContent(name, obj) -> None
|
||||
|
||||
@@ -213,7 +216,7 @@ class PropertyContainer(Persistence):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def renameProperty(self, oldName: str, newName: str) -> None:
|
||||
def renameProperty(self, oldName: str, newName: str, /) -> None:
|
||||
"""
|
||||
renameProperty(oldName, newName) -> None
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.BaseClass import BaseClass
|
||||
from typing import Any, Final, overload, Dict
|
||||
@@ -19,7 +23,7 @@ class StringHasher(BaseClass):
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
||||
...
|
||||
|
||||
def getID(self, arg: Any, base64: bool = False) -> Any:
|
||||
def getID(self, arg: Any, base64: bool = False, /) -> Any:
|
||||
"""
|
||||
getID(txt|id, base64=False) -> StringID
|
||||
|
||||
@@ -34,13 +38,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: ...
|
||||
|
||||
@constmethod
|
||||
def isSame(self, other: "StringHasher") -> bool:
|
||||
def isSame(self, other: "StringHasher", /) -> bool:
|
||||
"""
|
||||
Check if two hasher are the same
|
||||
"""
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, constmethod, class_declarations
|
||||
from Base.BaseClass import BaseClass
|
||||
from typing import Any, Final, List
|
||||
@@ -21,7 +25,7 @@ class StringID(BaseClass):
|
||||
"""
|
||||
|
||||
@constmethod
|
||||
def isSame(self, other: "StringID") -> bool:
|
||||
def isSame(self, other: "StringID", /) -> bool:
|
||||
"""
|
||||
Check if two StringIDs are the same
|
||||
"""
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from DocumentObjectExtension import DocumentObjectExtension
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user