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 mypy CI to python 3.12 #9319

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Conversation

Illviljan
Copy link
Contributor

@Illviljan Illviljan commented Aug 6, 2024

xref #9315

@Illviljan Illviljan changed the title Update ci-additional.yaml Update mypy CI to python 3.12 Aug 6, 2024
@Illviljan
Copy link
Contributor Author

Strange typing errors with 3.12, the ignores fixes the following errors:

xarray/tests/test_typed_ops.py: note: In function "test_dataset_typed_ops":
xarray/tests/test_typed_ops.py:139: error: Argument 1 to "_test" has incompatible type "Variable"; expected "Dataset"  [arg-type]
xarray/tests/test_typed_ops.py:140: error: Argument 1 to "_test" has incompatible type "DataArray"; expected "Dataset"  [arg-type]
xarray/tests/test_typed_ops.py:151: error: Argument 1 to "_test" has incompatible type "Variable"; expected "Dataset"  [arg-type]
xarray/tests/test_typed_ops.py:152: error: Argument 1 to "_test" has incompatible type "DataArray"; expected "Dataset"  [arg-type]
xarray/tests/test_typed_ops.py:163: error: Argument 1 to "_test" has incompatible type "Variable"; expected "Dataset"  [arg-type]
xarray/tests/test_typed_ops.py:164: error: Argument 1 to "_test" has incompatible type "DataArray"; expected "Dataset"  [arg-type]
Found 6 errors in 1 file (checked 172 source files)

I'm not sure how to deal with this, any ideas @headtr1ck ? Are these similar issues as the other ignores in these tests?

xref #8969.

@Illviljan Illviljan added the run-pyright Run pyright type checker label Aug 6, 2024
@headtr1ck
Copy link
Collaborator

Well, the ignores just show that the operators are not properly typed.
Maybe once 3.9 support is dropped I can try to improve this and get it working properly again...

@dcherian
Copy link
Contributor

dcherian commented Aug 6, 2024

once 3.9 support is dropped

Let's do this now!

@Illviljan Illviljan added the run-upstream Run upstream CI label Aug 14, 2024
@Armavica
Copy link
Contributor

Armavica commented Sep 8, 2024

Could it be linked to #9365?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-pyright Run pyright type checker run-upstream Run upstream CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants