Skip to content

Commit 85c0ccb

Browse files
authored
πŸ› missing __slots__ (#908)
2 parents aa50783 + af77f8c commit 85c0ccb

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

β€Žscipy-stubs/_lib/_util.pyiβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ if sys.version_info >= (3, 14):
4545
__conditional_annotations__: Final[set[int]] = ...
4646

4747
class AxisError(ValueError, IndexError):
48+
__slots__ = "_msg", "axis", "ndim"
49+
4850
_msg: Final[str | None]
4951
axis: Final[int | None]
5052
ndim: Final[onp.NDim | None]

β€Žscipy-stubs/interpolate/_interpolate.pyiβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ class interp1d(_Interpolator1D): # legacy
7777
) -> None: ...
7878

7979
class _PPolyBase(Generic[_CT_co]):
80+
__slots__ = "axis", "c", "extrapolate", "x"
81+
8082
c: onp.Array[onp.AtLeast2D, _CT_co]
8183
x: onp.Array1D[np.float64]
8284
extrapolate: Final[_Extrapolate]

β€Žscipy-stubs/io/_mmio.pyiβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ class _MMFileKwargs(TypedDict, total=False):
2626
###
2727

2828
class MMFile:
29+
__slots__ = "_cols", "_entries", "_field", "_format", "_rows", "_symmetry"
30+
2931
FORMAT_COORDINATE: ClassVar[str] = "coordinate"
3032
FORMAT_ARRAY: ClassVar[str] = "array"
3133
FORMAT_VALUES: ClassVar[tuple[str, ...]] = "coordinate", "array"

0 commit comments

Comments
Β (0)