7
7
from typing import Sequence
8
8
9
9
pardir = 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
14
12
15
13
from pipenv .vendor .pipdeptree ._cli import get_options
16
14
from pipenv .vendor .pipdeptree ._detect_env import detect_active_interpreter
17
15
from pipenv .vendor .pipdeptree ._discovery import get_installed_distributions
18
16
from pipenv .vendor .pipdeptree ._models import PackageDAG
19
17
from pipenv .vendor .pipdeptree ._render import render
20
18
from 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
+ )
22
24
23
25
24
26
def main (args : Sequence [str ] | None = None ) -> None | int :
@@ -38,7 +40,9 @@ def main(args: Sequence[str] | None = None) -> None | int:
38
40
print (f"(resolved python: { resolved_path } )" , file = sys .stderr ) # noqa: T201
39
41
40
42
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 ,
42
46
)
43
47
tree = PackageDAG .from_pkgs (pkgs )
44
48
0 commit comments