[bindings] re-shape some keyword-only signatures

This commit is contained in:
Frank Martinez
2025-09-26 09:29:30 -05:00
parent fca800baca
commit 8e51db4072
11 changed files with 40 additions and 23 deletions

View File

@@ -67,7 +67,6 @@ class DocumentObject(ExtensionContainer):
def addProperty(
self,
*,
type: str,
name: str,
group: str = "",
@@ -159,8 +158,8 @@ class DocumentObject(ExtensionContainer):
def getSubObject(
self,
*,
subname: Union[str, List[str], Tuple[str, ...]],
*,
retType: int = 0,
matrix: Matrix = None,
transform: bool = True,

View File

@@ -79,7 +79,7 @@ class Vector(PyObjectBase):
# fmt: off
@overload
def __init__(self, *, x: float = 0, y: float = 0, z: float = 0) -> None: ...
def __init__(self, x: float = 0, y: float = 0, z: float = 0) -> None: ...
@overload
def __init__(self, vector: "Vector") -> None: ...
@overload

View File

@@ -125,8 +125,14 @@ class Command(PyObjectBase):
@staticmethod
def createCustomCommand(
*, macroFile: str, menuText: str, toolTip: str, whatsThis: str, statusTip: str, pixmap: str,
shortcut: str
*,
macroFile: str,
menuText: str,
toolTip: str,
whatsThis: str,
statusTip: str,
pixmap: str,
shortcut: str,
) -> str:
"""
createCustomCommand(macroFile, menuText, toolTip, whatsThis, statusTip, pixmap, shortcut) -> str

View File

@@ -22,7 +22,6 @@ class ViewProvider(ExtensionContainer):
def addProperty(
self,
*,
type: str,
name: str,
group: str,
@@ -122,7 +121,7 @@ class ViewProvider(ExtensionContainer):
...
def canDropObject(
self, *, obj: Any = None, owner: Any = None, subname: str, elem: Optional[List[str]] = None
self, obj: Any = None, *, owner: Any = None, subname: str, elem: Optional[List[str]] = None
) -> bool:
"""
canDropObject(obj=None, owner=None, subname, elem=None) -> bool
@@ -143,7 +142,7 @@ class ViewProvider(ExtensionContainer):
...
def dropObject(
self, *, obj: Any, owner: Any = None, subname: str, elem: Optional[List[str]] = None
self, obj: Any, *, owner: Any = None, subname: str, elem: Optional[List[str]] = None
) -> str:
"""
dropObject(obj, owner=None, subname, elem=None) -> str

View File

@@ -40,7 +40,7 @@ class GeometrySurface(Geometry):
...
@constmethod
def toShell(self, *, Bounds: object, Segment: object) -> Any:
def toShell(self, Bounds: object, Segment: object) -> Any:
"""
Make a shell of the surface.
"""
@@ -109,7 +109,7 @@ class GeometrySurface(Geometry):
...
@constmethod
def projectPoint(self, *, Point: Vector, Method: str = ...) -> Any:
def projectPoint(self, Point: Vector, Method: str = ...) -> Any:
"""
Computes the projection of a point on the surface
@@ -247,7 +247,6 @@ class GeometrySurface(Geometry):
@constmethod
def toBSpline(
self,
*,
tolerance: float = 1e-7,
continuity_u: str = "C1",
continuity_v: str = "C1",

View File

@@ -103,7 +103,6 @@ class HLRBRep_Algo(PyObjectBase):
def setProjector(
self,
*,
Origin: tuple[float, float, float] = (0, 0, 0),
ZDir: tuple[float, float, float] = (0, 0, 0),
XDir: tuple[float, float, float] = (0, 0, 0),

View File

@@ -110,7 +110,6 @@ class HLRBRep_PolyAlgo(PyObjectBase):
def setProjector(
self,
*,
Origin: tuple[float, float, float] = (0.0, 0.0, 0.0),
ZDir: tuple[float, float, float] = (0.0, 0.0, 0.0),
XDir: tuple[float, float, float] = (0.0, 0.0, 0.0),

View File

@@ -146,7 +146,7 @@ class HLRToShape(PyObjectBase):
...
def compoundOfEdges(
self, Type: int, Visible: bool, In3D: bool, *, Shape: Optional[TopoShape] = None
self, Type: int, Visible: bool, In3D: bool, Shape: Optional[TopoShape] = None
) -> TopoShape:
"""
compoundOfEdges(Type: int, Visible: bool, In3D: bool, Shape=None) -> TopoShape

View File

@@ -7,7 +7,6 @@ from Base.Vector import Vector
from Base.Matrix import Matrix
from Base.BoundBox import BoundBox
from App.ComplexGeoData import ComplexGeoData
from __future__ import annotations
from typing import Final, List, Tuple, Union, overload
@@ -471,7 +470,7 @@ class TopoShape(ComplexGeoData):
@constmethod
def transformed(
self, *, matrix: Matrix, copy: bool = False, checkScale: bool = False, op: str = None
self, matrix: Matrix, *, copy: bool = False, checkScale: bool = False, op: str = None
) -> TopoShape:
"""
Create a new transformed shape
@@ -656,8 +655,14 @@ class TopoShape(ComplexGeoData):
@constmethod
def makeEvolved(
self, *, Profile: TopoShape, Join: int, AxeProf: bool, Solid: bool, ProfOnSpine: bool,
Tolerance: float
self,
Profile: TopoShape,
Join: int,
AxeProf: bool,
*,
Solid: bool,
ProfOnSpine: bool,
Tolerance: float,
) -> None:
"""
Profile along the spine

View File

@@ -110,8 +110,14 @@ class TopoShapeFace(TopoShape):
@constmethod
def makeEvolved(
self, *, Profile: TopoShape, Join: int, AxeProf: bool, Solid: bool, ProfOnSpine: bool,
Tolerance: float
self,
Profile: TopoShape,
Join: int,
*,
AxeProf: bool,
Solid: bool,
ProfOnSpine: bool,
Tolerance: float,
) -> TopoShape:
"""
Profile along the spine

View File

@@ -140,8 +140,14 @@ class TopoShapeWire(TopoShape):
@constmethod
def makeEvolved(
self, *, Profile: TopoShape, Join: int, AxeProf: bool, Solid: bool, ProfOnSpine: bool,
Tolerance: float
self,
Profile: TopoShape,
Join: int,
*,
AxeProf: bool,
Solid: bool,
ProfOnSpine: bool,
Tolerance: float,
) -> TopoShape:
"""
Profile along the spine
@@ -151,7 +157,6 @@ class TopoShapeWire(TopoShape):
@constmethod
def approximate(
self,
*,
Tol2d: float = None,
Tol3d: float = 0.0001,
MaxSegments: int = 10,