[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,4 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# SPDX-License: LGPL-2.1-or-later
from __future__ import annotations
from Metadata import export, constmethod
from PyObjectBase import PyObjectBase
@@ -53,7 +55,7 @@ class Quantity(PyObjectBase):
# fmt: on
@constmethod
def toStr(self, decimals: int = ...) -> str:
def toStr(self, decimals: int = ..., /) -> str:
"""
toStr([decimals])
@@ -63,9 +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]:
"""
@@ -74,13 +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:
"""
@@ -96,7 +98,7 @@ class Quantity(PyObjectBase):
...
@constmethod
def __round__(self, ndigits: int = ...) -> Union[int, float]:
def __round__(self, ndigits: int = ..., /) -> Union[int, float]:
"""
Returns the Integral closest to x, rounding half toward even.
When an argument is passed, work like built-in round(x, ndigits).
@@ -104,6 +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: ...