diff --git a/.github/workflows/build_master.yml b/.github/workflows/build_master.yml index 5459dd52f..61799f6c3 100644 --- a/.github/workflows/build_master.yml +++ b/.github/workflows/build_master.yml @@ -88,6 +88,6 @@ jobs: - name: Stubtest run: | - stubtest netCDF4 --allowlist .github/stubtest-allowlist --mypy-config-file=pyproject.toml + stubtest netCDF4 --allowlist .github/stubtest-allowlist --ignore-unused-allowlist --mypy-config-file=pyproject.toml mypy test mypy examples diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index de503b531..82e014edd 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -85,7 +85,7 @@ jobs: if: ${{ github.event_name }} == "pull_request" - name: "Building ${{ matrix.os }} (${{ matrix.arch }}) wheels" - uses: pypa/cibuildwheel@v3.4.0 + uses: pypa/cibuildwheel@v3.4.1 env: CIBW_ARCHS: ${{ matrix.arch }} @@ -128,7 +128,7 @@ jobs: python=${{ matrix.python-version }} libnetcdf=4.9.3 --channel conda-forge - name: Build wheels for Windows/Mac - uses: pypa/cibuildwheel@v3.4.0 + uses: pypa/cibuildwheel@v3.4.1 env: CIBW_ARCHS: ${{ matrix.arch }} @@ -167,7 +167,7 @@ jobs: echo "NETCDF4_DIR=C:\vcpkg\installed\arm64-windows" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Build wheels for Windows ARM64 - uses: pypa/cibuildwheel@v3.4.0 + uses: pypa/cibuildwheel@v3.4.1 env: CIBW_ARCHS: ARM64 CIBW_SKIP: "cp310-*" diff --git a/src/netCDF4/__init__.pyi b/src/netCDF4/__init__.pyi index 4b11688b1..bb0c30831 100644 --- a/src/netCDF4/__init__.pyi +++ b/src/netCDF4/__init__.pyi @@ -385,13 +385,13 @@ class Dataset: def has_zstd_filter(self) -> bool: ... def has_bzip2_filter(self) -> bool: ... def has_szip_filter(self) -> bool: ... - def __getitem__(self, elem: str) -> Any: ... # should be Group | Variable, but this causes too many problems + def __getitem__(self, elem: str, /) -> Any: ... # should be Group | Variable, but this causes too many problems # __iter__ and __contains__ always error because iteration and membership ops are not allowed def __iter__(self) -> NoReturn: ... - def __contains__(self, key) -> NoReturn: ... - def __setattr__(self, name: str, value: Any) -> None: ... - def __getattr__(self, name: str) -> Any: ... - def __delattr__(self, name: str): ... + def __contains__(self, key, /) -> NoReturn: ... + def __setattr__(self, name: str, value: Any, /) -> None: ... + def __getattr__(self, name: str, /) -> Any: ... + def __delattr__(self, name: str, /): ... def __reduce__(self) -> NoReturn: ... def __enter__(self) -> Self: ... def __exit__(self, atype, value, traceback) -> None: ... @@ -585,11 +585,11 @@ class Variable(Generic[VarT]): def set_ncstring_attrs(self, ncstring_attrs: bool) -> None: ... def set_collective(self, value: bool) -> None: ... def get_dims(self) -> tuple[Dimension, ...]: ... - def __delattr__(self, name: str) -> None: ... - def __setattr__(self, name: str, value: Any) -> None: ... - def __getattr__(self, name: str) -> Any: ... - def __getitem__(self, elem: Any) -> Any: ... - def __setitem__(self, elem: Any, data: npt.ArrayLike) -> None: ... + def __delattr__(self, name: str, /) -> None: ... + def __setattr__(self, name: str, value: Any, /) -> None: ... + def __getattr__(self, name: str, /) -> Any: ... + def __getitem__(self, elem: Any, /) -> Any: ... + def __setitem__(self, elem: Any, data: npt.ArrayLike, /) -> None: ... def __array__(self) -> np.ndarray: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[Any]: ... # faux method so mypy believes Variable is iterable