@@ -6,7 +6,6 @@ import typing
66
77import numpy
88import numpy .typing
9- import typing_extensions
109
1110__all__ = ["IndexArray3D" , "SectionArrayMap" ]
1211
@@ -16,13 +15,19 @@ class IndexArray3D:
1615 """
1716
1817 @typing .overload
19- def __init__ (self , shape : tuple [int , int , int ]) -> None : ...
18+ def __init__ (
19+ self , shape : tuple [typing .SupportsInt , typing .SupportsInt , typing .SupportsInt ]
20+ ) -> None : ...
2021 @typing .overload
21- def __init__ (self , shape : tuple [int , int , int ], value : int ) -> None : ...
22+ def __init__ (
23+ self ,
24+ shape : tuple [typing .SupportsInt , typing .SupportsInt , typing .SupportsInt ],
25+ value : typing .SupportsInt ,
26+ ) -> None : ...
2227 @typing .overload
2328 def __init__ (self , other : IndexArray3D ) -> None : ...
2429 @typing .overload
25- def __init__ (self , arg0 : typing_extensions .Buffer ) -> None : ...
30+ def __init__ (self , arg0 : collections . abc .Buffer ) -> None : ...
2631 @property
2732 def shape (self ) -> tuple [int , int , int ]: ...
2833 @property
@@ -33,35 +38,48 @@ class SectionArrayMap:
3338 A container of sub-chunk arrays.
3439 """
3540
36- def __contains__ (self , arg0 : int ) -> bool : ...
37- def __delitem__ (self , arg0 : int ) -> None : ...
41+ def __contains__ (self , arg0 : typing . SupportsInt ) -> bool : ...
42+ def __delitem__ (self , arg0 : typing . SupportsInt ) -> None : ...
3843 def __eq__ (self , arg0 : typing .Any ) -> bool | types .NotImplementedType : ...
39- def __getitem__ (self , arg0 : int ) -> numpy .typing .NDArray [numpy .uint32 ]: ...
44+ def __getitem__ (
45+ self , arg0 : typing .SupportsInt
46+ ) -> numpy .typing .NDArray [numpy .uint32 ]: ...
4047 def __hash__ (self ) -> int : ...
4148 def __init__ (
4249 self ,
43- array_shape : tuple [int , int , int ],
44- default_array : int | IndexArray3D | typing_extensions .Buffer ,
50+ array_shape : tuple [typing .SupportsInt , typing .SupportsInt , typing .SupportsInt ],
51+ default_array : (
52+ typing .SupportsInt
53+ | amulet .core .chunk .component .section_array_map .IndexArray3D
54+ | collections .abc .Buffer
55+ ),
4556 ) -> None : ...
4657 def __iter__ (self ) -> collections .abc .Iterator [int ]: ...
4758 def __len__ (self ) -> int : ...
4859 def __setitem__ (
49- self , arg0 : int , arg1 : IndexArray3D | typing_extensions .Buffer
60+ self ,
61+ arg0 : typing .SupportsInt ,
62+ arg1 : (
63+ amulet .core .chunk .component .section_array_map .IndexArray3D
64+ | collections .abc .Buffer
65+ ),
5066 ) -> None : ...
5167 def get (
52- self , key : int , default : numpy .typing .NDArray [numpy .uint32 ] | None = None
68+ self ,
69+ key : typing .SupportsInt ,
70+ default : numpy .typing .NDArray [numpy .uint32 ] | None = None ,
5371 ) -> numpy .typing .NDArray [numpy .uint32 ] | None : ...
5472 def items (
5573 self ,
5674 ) -> collections .abc .ItemsView [int , numpy .typing .NDArray [numpy .uint32 ]]: ...
5775 def keys (self ) -> collections .abc .KeysView [int ]: ...
5876 def pop (
59- self , key : int , default : numpy .typing .NDArray [numpy .uint32 ] = ...
77+ self , key : typing . SupportsInt , default : numpy .typing .NDArray [numpy .uint32 ] = ...
6078 ) -> numpy .typing .NDArray [numpy .uint32 ]: ...
6179 def popitem (self ) -> tuple [int , numpy .typing .NDArray [numpy .uint32 ]]: ...
62- def populate (self , arg0 : int ) -> None : ...
80+ def populate (self , arg0 : typing . SupportsInt ) -> None : ...
6381 def setdefault (
64- self , arg0 : int , arg1 : numpy .typing .NDArray [numpy .uint32 ] | None
82+ self , arg0 : typing . SupportsInt , arg1 : numpy .typing .NDArray [numpy .uint32 ] | None
6583 ) -> numpy .typing .NDArray [numpy .uint32 ] | None : ...
6684 def update (self , other : typing .Any = (), ** kwargs : typing .Any ) -> None : ...
6785 def values (
@@ -73,5 +91,10 @@ class SectionArrayMap:
7391 def default_array (self ) -> int | numpy .ndarray : ...
7492 @default_array .setter
7593 def default_array (
76- self , arg1 : int | IndexArray3D | typing_extensions .Buffer
94+ self ,
95+ arg1 : (
96+ typing .SupportsInt
97+ | amulet .core .chunk .component .section_array_map .IndexArray3D
98+ | collections .abc .Buffer
99+ ),
77100 ) -> None : ...
0 commit comments