dependence 1.0.4__py3-none-any.whl → 1.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dependence/__main__.py +12 -6
- dependence/_utilities.py +203 -106
- dependence/freeze.py +52 -36
- dependence/update.py +67 -56
- dependence/upgrade.py +220 -0
- {dependence-1.0.4.dist-info → dependence-1.1.0.dist-info}/METADATA +81 -16
- dependence-1.1.0.dist-info/RECORD +11 -0
- {dependence-1.0.4.dist-info → dependence-1.1.0.dist-info}/WHEEL +1 -1
- dependence-1.0.4.dist-info/RECORD +0 -10
- {dependence-1.0.4.dist-info → dependence-1.1.0.dist-info}/entry_points.txt +0 -0
dependence/__main__.py
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import sys
|
|
2
2
|
from importlib import import_module
|
|
3
|
-
from
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
from
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from types import ModuleType
|
|
7
|
+
|
|
8
|
+
from dependence import __name__ as _module_name
|
|
9
|
+
from dependence._utilities import get_exception_text
|
|
7
10
|
|
|
8
11
|
|
|
9
12
|
def _print_help() -> None:
|
|
10
|
-
print(
|
|
13
|
+
print( # noqa: T201
|
|
11
14
|
"Usage:\n"
|
|
12
15
|
" dependence <command> [options]\n\n"
|
|
13
16
|
"Commands:\n"
|
|
@@ -20,7 +23,10 @@ def _print_help() -> None:
|
|
|
20
23
|
"installed\n"
|
|
21
24
|
" distribution or project, in a similar "
|
|
22
25
|
"format\n"
|
|
23
|
-
" to the output of `pip freeze
|
|
26
|
+
" to the output of `pip freeze`.\n"
|
|
27
|
+
" upgrade Upgrade all dependencies and align "
|
|
28
|
+
"project\n"
|
|
29
|
+
" requirement specifiers to match."
|
|
24
30
|
)
|
|
25
31
|
|
|
26
32
|
|
|
@@ -47,7 +53,7 @@ def main() -> None:
|
|
|
47
53
|
module = import_module(f"{_module_name}.{command}")
|
|
48
54
|
module.main() # type: ignore
|
|
49
55
|
except ImportError:
|
|
50
|
-
print(get_exception_text())
|
|
56
|
+
print(get_exception_text()) # noqa: T201
|
|
51
57
|
_print_help()
|
|
52
58
|
|
|
53
59
|
|