[bindings] fix signatures in pyi files

This commit is contained in:
Frank Martinez
2025-09-25 20:43:33 -05:00
parent 8c7f381416
commit 748004b4e4
247 changed files with 2001 additions and 897 deletions

View File

@@ -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.
"""