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

depgraph.py: type annotations #1054

Closed
wants to merge 1 commit into from

Conversation

berinaniesh
Copy link
Contributor

No description provided.

Signed-off-by: Berin Aniesh <berinaniesh@gmail.com>
@thesamesam
Copy link
Member

LGTM & adds no new mypy errors.

@@ -100,6 +100,10 @@
from _emerge.resolver.circular_dependency import circular_dependency_handler
from _emerge.resolver.output import Display, format_unmatched_atom

# Type annotation imports
from typing import Any, Optional, Dict, List, Tuple, Union
from _emerge.stdout_spinner import stdout_spinner
Copy link
Member

Choose a reason for hiding this comment

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

For these, I would really just quote the full type in references to avoid an unnecessary import.

Copy link
Member

Choose a reason for hiding this comment

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

Done in a5b4eb5. The motivation here being imports are slow and Portage already does a looooot of them.

@berinaniesh berinaniesh deleted the type-annotation branch June 16, 2023 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants