Skip to content

Commit 3136d61

Browse files
shoyermax-sixty
andauthored
Synchronize mypy test requirements to 1.17.1 (#10751)
* Update mypy test requirement to 1.17.1 * Fix mypy 1.17.1 compatibility issues - Add list-item to type ignore for df.columns assignment - Remove unnecessary attr-defined type ignores that mypy 1.17.1 now understands * Restore type ignores needed by mypy 1.17.1 in CI environment --------- Co-authored-by: Maximilian Roos <[email protected]> Co-authored-by: Maximilian Roos <[email protected]>
1 parent 558131e commit 3136d61

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/ci-additional.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116
python xarray/util/print_versions.py
117117
- name: Install mypy
118118
run: |
119-
python -m pip install "mypy==1.15" --force-reinstall
119+
python -m pip install "mypy==1.17.1" --force-reinstall
120120
121121
- name: Run mypy
122122
run: |
@@ -167,7 +167,7 @@ jobs:
167167
python xarray/util/print_versions.py
168168
- name: Install mypy
169169
run: |
170-
python -m pip install "mypy==1.15" --force-reinstall
170+
python -m pip install "mypy==1.17.1" --force-reinstall
171171
172172
- name: Run mypy
173173
run: |

xarray/tests/test_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5303,7 +5303,7 @@ def test_from_dataframe_unsorted_levels(self) -> None:
53035303
def test_from_dataframe_non_unique_columns(self) -> None:
53045304
# regression test for GH449
53055305
df = pd.DataFrame(np.zeros((2, 2)))
5306-
df.columns = ["foo", "foo"] # type: ignore[assignment,unused-ignore]
5306+
df.columns = ["foo", "foo"] # type: ignore[assignment,list-item,unused-ignore]
53075307
with pytest.raises(ValueError, match=r"non-unique columns"):
53085308
Dataset.from_dataframe(df)
53095309

0 commit comments

Comments
 (0)