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

Idea: Pyreverse should distinguish between functional imports and type checking imports #8112

Closed
nickdrozd opened this issue Jan 25, 2023 · 1 comment · Fixed by #8824 or #9093
Closed
Labels
Enhancement ✨ Improvement to a component pyreverse Related to pyreverse component
Milestone

Comments

@nickdrozd
Copy link
Contributor

Current problem

Pyreverse generates a graph that depicts the import dependencies between modules. But it doesn't distinguish between imports that are used for runtime functionality and imports that are used only for type checking (that is, imports behind the TYPE_CHECKING flag).

Desired solution

It would be neat if different kinds of import dependencies were distinguished on the graph. For example, regular imports could be notated with a straight line (as is currently the case), while type imports could be notated with a squiggly line. Then it would be possible to tell at a glance what sort of relationship different modules really have.

Additional context

No response

@nickdrozd nickdrozd added Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling Enhancement ✨ Improvement to a component pyreverse Related to pyreverse component and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Jan 25, 2023
@nickdrozd
Copy link
Contributor Author

This would be especially handy in conjunction with #8111.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ✨ Improvement to a component pyreverse Related to pyreverse component
Projects
None yet
2 participants