Skip to content

Tougher mypy checks#9206

Merged
jsignell merged 1 commit intodask:mainfrom
crusaderky:mypy
Jun 29, 2022
Merged

Tougher mypy checks#9206
jsignell merged 1 commit intodask:mainfrom
crusaderky:mypy

Conversation

@crusaderky
Copy link
Copy Markdown
Collaborator

Mirrors dask/distributed#6601 and dask/distributed#6606.

Note that I omitted disallow_incomplete_defs as it would have costed more time than what I'm happy spending right now - something for a future iteration.

:doc:`delayed` yielding None
"""
if split_every is None:
# FIXME https://github.com/python/typeshed/issues/5074
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this special-cased in mypy? I don't see any linked issues in the above. In any event, nice to remove type: ignores

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The annotation was originally numbers.Number | Literal[False] | None.
Since in type annotations (and in type annotations only) int is a subclass of float, I simplified it, but I forgot to remove the # type: ignore.

Copy link
Copy Markdown
Collaborator

@ian-r-rose ian-r-rose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took a look at this with @pavithraes, and it looks good. Thanks!

@pavithraes pavithraes requested a review from jsignell June 29, 2022 17:01
@jsignell jsignell merged commit 6af81c9 into dask:main Jun 29, 2022
@jsignell
Copy link
Copy Markdown
Member

Thanks @crusaderky!

@crusaderky crusaderky deleted the mypy branch June 30, 2022 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants