diff --git a/src/numpy-stubs/lib/_version.pyi b/src/numpy-stubs/lib/_version.pyi index c53ef795..31ba511f 100644 --- a/src/numpy-stubs/lib/_version.pyi +++ b/src/numpy-stubs/lib/_version.pyi @@ -1,17 +1,20 @@ +from typing import Final + __all__ = ["NumpyVersion"] class NumpyVersion: - vstring: str - version: str - major: int - minor: int - bugfix: int - pre_release: str - is_devversion: bool - def __init__(self, vstring: str) -> None: ... - def __lt__(self, other: str | NumpyVersion) -> bool: ... - def __le__(self, other: str | NumpyVersion) -> bool: ... - def __eq__(self, other: str | NumpyVersion) -> bool: ... # type: ignore[override] - def __ne__(self, other: str | NumpyVersion) -> bool: ... # type: ignore[override] - def __gt__(self, other: str | NumpyVersion) -> bool: ... - def __ge__(self, other: str | NumpyVersion) -> bool: ... + vstring: Final[str] + version: Final[str] + major: Final[int] + minor: Final[int] + bugfix: Final[int] + pre_release: Final[str] + is_devversion: Final[bool] + + def __init__(self, /, vstring: str) -> None: ... + def __lt__(self, other: str | NumpyVersion, /) -> bool: ... + def __le__(self, other: str | NumpyVersion, /) -> bool: ... + def __eq__(self, other: str | NumpyVersion, /) -> bool: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] + def __ne__(self, other: str | NumpyVersion, /) -> bool: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] + def __gt__(self, other: str | NumpyVersion, /) -> bool: ... + def __ge__(self, other: str | NumpyVersion, /) -> bool: ...