8000 add types for `friendly_traceback.console_helpers` by hoefling · Pull Request #38 · friendly-traceback/friendly-traceback · GitHub
[go: up one dir, main page]

Skip to content

add types for friendly_traceback.console_helpers #38

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 1 commit into from
Aug 7, 2021

Conversation

hoefling
Copy link
Member
@hoefling hoefling commented Aug 7, 2021

The proposed typing leaves room for improvements, especially in introducing a proper protocol for helper functions to make the .help function recognizable. We could add a decorator that does explicit casts to a Helper protocol as suggested in python/mypy#2087, but this would require code changes that go beyond type hints, thus leaving it out for now.

Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
@aroberge
Copy link
Contributor
aroberge commented Aug 7, 2021

I would not worry about the .help attribute or any other attribute added to functions; I plan to move these to friendly (as opposed to friendly-traceback) as the console for friendly-traceback is meant only for testing by developers; other users should use the console from friendly.

@aroberge aroberge merged commit 44d68e9 into friendly-traceback:main Aug 7, 2021
@hoefling hoefling deleted the pep484/console-helpers branch August 7, 2021 11:45
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
0