dependence 1.0.2__py3-none-any.whl → 1.2.5__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 CHANGED
@@ -1,13 +1,16 @@
1
1
  import sys
2
2
  from importlib import import_module
3
- from types import ModuleType
3
+ from typing import TYPE_CHECKING
4
4
 
5
- from . import __name__ as _module_name
6
- from ._utilities import get_exception_text
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,8 +53,9 @@ 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()
58
+ sys.exit(1)
52
59
 
53
60
 
54
61
  if __name__ == "__main__":