Skip to content
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

Export renderers from pyinstrument.renderers #356

Merged
merged 1 commit into from
Dec 22, 2024

Conversation

rmartin16
Copy link
Contributor

Type checkers don't like it when you use symbols that are not exported in that module. Putting the renderers in __all__ will export them here so imports like this one pass mypy:

from pyinstrument.renderers import HTMLRenderer

Currently one must specify the specific module that owns the renderer to import it.

from pyinstrument.renderers.html import HTMLRenderer

Type checkers don't like it when you use symbols that are not exported in that module. Putting the renderers in `__all__` will export them here so imports like this one pass mypy:

from pyinstrument.renderers import HTMLRenderer

Currently one must specify the specific module that owns the renderer to import it.

from pyinstrument.renderers.html import HTMLRenderer
Copy link
Owner

@joerick joerick left a comment

Choose a reason for hiding this comment

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

thanks!

@joerick joerick added the automerge Tells https://github.com/apps/mergery to Squash-merge the PR when the button is green. label Dec 22, 2024
@joerick joerick merged commit 0f9e64c into joerick:main Dec 22, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Tells https://github.com/apps/mergery to Squash-merge the PR when the button is green.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants