Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to mypy1.7 #8501

Merged
merged 3 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci-additional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
python xarray/util/print_versions.py
- name: Install mypy
run: |
python -m pip install "mypy<1.7" --force-reinstall
python -m pip install "mypy<1.8" --force-reinstall

- name: Run mypy
run: |
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
python xarray/util/print_versions.py
- name: Install mypy
run: |
python -m pip install "mypy<1.7" --force-reinstall
python -m pip install "mypy<1.8" --force-reinstall

- name: Run mypy
run: |
Expand Down
2 changes: 2 additions & 0 deletions doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ Internal Changes
- :py:meth:`DataArray.bfill` & :py:meth:`DataArray.ffill` now use numbagg by
default, which is up to 5x faster where parallelization is possible. (:pull:`8339`)
By `Maximilian Roos <https://github.com/max-sixty>`_.
- Update mypy version to 1.7 (:issue:`8448`, :pull:`8501`).
By `Michael Niklas <https://github.com/headtr1ck>`_.

.. _whats-new.2023.11.0:

Expand Down
4 changes: 2 additions & 2 deletions xarray/core/alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ def align(
...


def align( # type: ignore[misc]
def align(
*objects: T_Alignable,
join: JoinOptions = "inner",
copy: bool = True,
Expand Down Expand Up @@ -1153,7 +1153,7 @@ def broadcast(
...


def broadcast( # type: ignore[misc]
def broadcast(
*args: T_Alignable, exclude: str | Iterable[Hashable] | None = None
) -> tuple[T_Alignable, ...]:
"""Explicitly broadcast any number of DataArray or Dataset objects against
Expand Down
4 changes: 2 additions & 2 deletions xarray/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -7979,8 +7979,8 @@ def sortby(
variables = variables
arrays = [v if isinstance(v, DataArray) else self[v] for v in variables]
aligned_vars = align(self, *arrays, join="left")
aligned_self = aligned_vars[0]
aligned_other_vars: tuple[DataArray, ...] = aligned_vars[1:]
aligned_self = cast("Self", aligned_vars[0])
aligned_other_vars = cast(tuple[DataArray, ...], aligned_vars[1:])
vars_by_dim = defaultdict(list)
for data_array in aligned_other_vars:
if data_array.ndim != 1:
Expand Down
Loading