Skip to content

ref: Type hints for init() #401

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

Merged
merged 7 commits into from
Jun 27, 2019
Merged

ref: Type hints for init() #401

merged 7 commits into from
Jun 27, 2019

Conversation

untitaker
Copy link
Member

@untitaker untitaker commented Jun 25, 2019

Fix #272

@untitaker untitaker requested review from mitsuhiko and bruno-garcia and removed request for mitsuhiko June 26, 2019 13:33
@untitaker untitaker changed the title [wip] ref: Type hints for init() ref: Type hints for init() Jun 26, 2019


# This type exists to trick mypy and PyCharm into thinking `init` and `Client`
Copy link
Member

Choose a reason for hiding this comment

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

trick huh?

@untitaker untitaker merged commit 5726d1b into master Jun 27, 2019
@untitaker untitaker deleted the ref/type-hints-4-init branch June 27, 2019 16:12
@untitaker
Copy link
Member Author

@bluetech Since you're using mypy in real code together with the SDK, could you test if this still works with this PR? If yes I'll release it.

@bluetech
Copy link
Contributor

I installed from master, and verified that sentry.init() now type-checks its arguments - nice! There weren't any new errors from mypy. Note I didn't get a chance to actually execute the code (sentry init is skipped locally).

@untitaker
Copy link
Member Author

That seems fine, the runtime code didn't change. Will release now, thanks!

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.

Python 3 type hints are broken/unusuable
3 participants