77from typing import Sequence
88
99pardir = os .path .dirname (os .path .dirname (os .path .abspath (__file__ )))
10- # for finding pipdeptree itself
11- sys .path .append (pardir )
12- # for finding stuff in vendor and patched
13- sys .path .append (os .path .dirname (os .path .dirname (pardir )))
10+ # for finding pipdeptree itself, vendor, and patched
11+ sys .path = [pardir , os .path .dirname (os .path .dirname (pardir ))] + sys .path
1412
1513from pipenv .vendor .pipdeptree ._cli import get_options
1614from pipenv .vendor .pipdeptree ._detect_env import detect_active_interpreter
1715from pipenv .vendor .pipdeptree ._discovery import get_installed_distributions
1816from pipenv .vendor .pipdeptree ._models import PackageDAG
1917from pipenv .vendor .pipdeptree ._render import render
2018from pipenv .vendor .pipdeptree ._validate import validate
21- from pipenv .vendor .pipdeptree ._warning import WarningPrinter , WarningType , get_warning_printer
19+ from pipenv .vendor .pipdeptree ._warning import (
20+ WarningPrinter ,
21+ WarningType ,
22+ get_warning_printer ,
23+ )
2224
2325
2426def main (args : Sequence [str ] | None = None ) -> None | int :
@@ -38,7 +40,9 @@ def main(args: Sequence[str] | None = None) -> None | int:
3840 print (f"(resolved python: { resolved_path } )" , file = sys .stderr ) # noqa: T201
3941
4042 pkgs = get_installed_distributions (
41- interpreter = options .python , local_only = options .local_only , user_only = options .user_only
43+ interpreter = options .python ,
44+ local_only = options .local_only ,
45+ user_only = options .user_only ,
4246 )
4347 tree = PackageDAG .from_pkgs (pkgs )
4448
0 commit comments