Skip to content

Fix annotations of CallList#593

Merged
markstory merged 1 commit intogetsentry:masterfrom
ziima:fix-calllist-typing
Oct 12, 2022
Merged

Fix annotations of CallList#593
markstory merged 1 commit intogetsentry:masterfrom
ziima:fix-calllist-typing

Conversation

@ziima
Copy link
Copy Markdown
Contributor

@ziima ziima commented Oct 12, 2022

With 0.22.0, mypy started to complain about constructions rsps.calls[0].request with an error

Item "List[Call]" of "Union[Call, List[Call]]" has no attribute "request"  [union-attr]

because it wasn't able to differentiate between the return types. I added overload annotation to handle that.

@beliaev-maksim
Copy link
Copy Markdown
Collaborator

hi, thanks

please add new version in changelog and add your item there

@ziima ziima force-pushed the fix-calllist-typing branch from b958e84 to 046e706 Compare October 12, 2022 07:56
@ziima
Copy link
Copy Markdown
Contributor Author

ziima commented Oct 12, 2022

Done.

@markstory markstory merged commit 26bb973 into getsentry:master Oct 12, 2022
@markstory
Copy link
Copy Markdown
Member

Thank you 🎉

@andersk
Copy link
Copy Markdown

andersk commented Dec 4, 2022

When you get a chance, it’d be great to get a new PyPI release, since none of the existing releases work with mypy (#552 for ≤ 0.20.0, #556 for 0.21.0, this for 0.22.0) and current Git works.

@beliaev-maksim
Copy link
Copy Markdown
Collaborator

closes #610

@howamith howamith mentioned this pull request Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants