Skip to content

Commit

Permalink
str as valid dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
headtr1ck committed Jun 26, 2024
1 parent 053e049 commit d0e9bd4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/netCDF4/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ class Variable(Generic[T_Datatype]):
@property
def name(self) -> str: ...
@property
def dtype(self) -> np.dtype: ...
def dtype(self) -> np.dtype | type[str]: ...
@property
def datatype(self) -> T_Datatype: ...
@property
Expand Down Expand Up @@ -551,11 +551,11 @@ class _Dimension:

class _Variable:
dimensions: tuple[str, ...]
dtype: np.dtype
dtype: np.dtype | type[str]

def __init__(self, dset: Dataset, varname: str, var, recdimname: str) -> None: ...
def __init__(self, dset: Dataset, varname: str, var: Variable[Any], recdimname: str) -> None: ...

def typecode(self) -> np.dtype: ...
def typecode(self) -> np.dtype | type[str]: ...
def ncattrs(self) -> list[str]: ...
def _shape(self) -> tuple[int, ...]: ...
def set_auto_chartostring(self, val: bool) -> None: ...
Expand All @@ -564,8 +564,8 @@ class _Variable:
def set_auto_scale(self, val: bool) -> None: ...
def set_always_mask(self, val: bool) -> None: ...

def __getattr__(self, name: str): ...
def __getitem__(self, elem: GetSetItemKey): ...
def __getattr__(self, name: str) -> Any: ...
def __getitem__(self, elem: GetSetItemKey) -> Any: ...
def __len__(self) -> int: ...


Expand Down

0 comments on commit d0e9bd4

Please sign in to comment.