Skip to content

Conversation

@vdonato
Copy link
Collaborator

@vdonato vdonato commented May 20, 2022

📚 Context

A new version of numpy that was released ~2 hours ago apparently made some improvements
to type inference when indexing into an NDArray. This caused mypy to get upset with us over what
was previously a necessary cast that is now redundant. We fixed this by adding a
# type: ignore[redundant-cast] so that we can support both older and newer numpy versions.

Note that we also had to turn off warn_unused_ignores since the ignore is sometimes used and
sometimes not depending on the Python version, but I don't see a good way around this.

  • What kind of change does this PR introduce?

    • Other, please describe: Fix the build

@vdonato vdonato marked this pull request as ready for review May 20, 2022 22:48
@vdonato vdonato requested a review from a team May 20, 2022 22:48
@vdonato vdonato force-pushed the ignore-redundant-cast branch from bdbddf6 to 1e9e82a Compare May 20, 2022 23:00
Copy link
Collaborator

@lukasmasuch lukasmasuch left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@vdonato vdonato merged commit 1a242f1 into streamlit:develop May 23, 2022
@vdonato vdonato deleted the ignore-redundant-cast branch May 23, 2022 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants