Skip to content

Commit

Permalink
fix: types
Browse files Browse the repository at this point in the history
  • Loading branch information
Justintime50 committed Jul 17, 2024
1 parent a946a7a commit 5ac1127
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pip_tree/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
Dict,
Iterable,
List,
Set,
Tuple,
)

Expand All @@ -22,7 +23,7 @@
def generate_pip_tree(path: str = SITE_PACKAGES_PATH) -> Tuple[List[Dict[str, Any]], int]:
"""Generate the Pip Tree of the virtual environment specified."""
pip_tree_results = []
required_by_data: Dict[str, List[str]] = {}
required_by_data: Dict[str, Set[str]] = {}
package_count = 0

packages = get_pip_package_list(path)
Expand Down Expand Up @@ -80,7 +81,7 @@ def get_package_details(package: Distribution) -> Dict[str, Any]:
return package_details


def _generate_reverse_requires_field(required_by_data: Dict[str, List[str]], package_details: Dict[str, Any]):
def _generate_reverse_requires_field(required_by_data: Dict[str, Set[str]], package_details: Dict[str, Any]):
"""Generate a reversed list from the `requires` fields and create a
collection of each `required_by` fields so each package can show what it's required by.
"""
Expand Down

0 comments on commit 5ac1127

Please sign in to comment.