cli2 2.6.3__tar.gz → 2.6.4__tar.gz

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.
Files changed (31) hide show
  1. {cli2-2.6.3/cli2.egg-info → cli2-2.6.4}/PKG-INFO +1 -1
  2. {cli2-2.6.3 → cli2-2.6.4}/cli2/group.py +5 -1
  3. {cli2-2.6.3 → cli2-2.6.4}/cli2/test_group.py +17 -0
  4. {cli2-2.6.3 → cli2-2.6.4/cli2.egg-info}/PKG-INFO +1 -1
  5. {cli2-2.6.3 → cli2-2.6.4}/setup.py +1 -1
  6. {cli2-2.6.3 → cli2-2.6.4}/MANIFEST.in +0 -0
  7. {cli2-2.6.3 → cli2-2.6.4}/README.rst +0 -0
  8. {cli2-2.6.3 → cli2-2.6.4}/classifiers.txt +0 -0
  9. {cli2-2.6.3 → cli2-2.6.4}/cli2/__init__.py +0 -0
  10. {cli2-2.6.3 → cli2-2.6.4}/cli2/argument.py +0 -0
  11. {cli2-2.6.3 → cli2-2.6.4}/cli2/cli.py +0 -0
  12. {cli2-2.6.3 → cli2-2.6.4}/cli2/colors.py +0 -0
  13. {cli2-2.6.3 → cli2-2.6.4}/cli2/command.py +0 -0
  14. {cli2-2.6.3 → cli2-2.6.4}/cli2/decorators.py +0 -0
  15. {cli2-2.6.3 → cli2-2.6.4}/cli2/entry_point.py +0 -0
  16. {cli2-2.6.3 → cli2-2.6.4}/cli2/node.py +0 -0
  17. {cli2-2.6.3 → cli2-2.6.4}/cli2/table.py +0 -0
  18. {cli2-2.6.3 → cli2-2.6.4}/cli2/test.py +0 -0
  19. {cli2-2.6.3 → cli2-2.6.4}/cli2/test_cli.py +0 -0
  20. {cli2-2.6.3 → cli2-2.6.4}/cli2/test_command.py +0 -0
  21. {cli2-2.6.3 → cli2-2.6.4}/cli2/test_decorators.py +0 -0
  22. {cli2-2.6.3 → cli2-2.6.4}/cli2/test_entrypoint.py +0 -0
  23. {cli2-2.6.3 → cli2-2.6.4}/cli2/test_inject.py +0 -0
  24. {cli2-2.6.3 → cli2-2.6.4}/cli2/test_node.py +0 -0
  25. {cli2-2.6.3 → cli2-2.6.4}/cli2/test_table.py +0 -0
  26. {cli2-2.6.3 → cli2-2.6.4}/cli2.egg-info/SOURCES.txt +0 -0
  27. {cli2-2.6.3 → cli2-2.6.4}/cli2.egg-info/dependency_links.txt +0 -0
  28. {cli2-2.6.3 → cli2-2.6.4}/cli2.egg-info/entry_points.txt +0 -0
  29. {cli2-2.6.3 → cli2-2.6.4}/cli2.egg-info/requires.txt +0 -0
  30. {cli2-2.6.3 → cli2-2.6.4}/cli2.egg-info/top_level.txt +0 -0
  31. {cli2-2.6.3 → cli2-2.6.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cli2
3
- Version: 2.6.3
3
+ Version: 2.6.4
4
4
  Summary: image:: https://yourlabs.io/oss/cli2/badges/master/pipeline.svg
5
5
  Home-page: https://yourlabs.io/oss/cli2
6
6
  Author: James Pic
@@ -1,4 +1,5 @@
1
1
  import inspect
2
+ import textwrap
2
3
 
3
4
  from .colors import colors
4
5
  from .command import Command
@@ -13,7 +14,10 @@ class Group(EntryPoint, dict):
13
14
  def __init__(self, name=None, doc=None, color=None, posix=False,
14
15
  outfile=None, cmdclass=None, log=True):
15
16
  self.name = name
16
- self.doc = doc or inspect.getdoc(self)
17
+ if doc:
18
+ self.doc = textwrap.dedent(doc).strip()
19
+ else:
20
+ self.doc = inspect.getdoc(self)
17
21
  self.color = color or colors.green
18
22
  self.posix = posix
19
23
  self.parent = None
@@ -54,6 +54,23 @@ def test_help():
54
54
  group('help', 'lol')
55
55
  assert 'not found' in group.outfile
56
56
 
57
+ group.group(
58
+ "test",
59
+ doc="""
60
+ Le Lorem Ipsum est simplement du faux texte employé dans la composition
61
+ et la mise en page avant impression. Le Lorem Ipsum est le faux texte
62
+
63
+ standard de l'imprimerie depuis les années 1500, quand un imprimeur
64
+ anonyme assembla ensemble des morceaux de texte pour réaliser un livre
65
+ applications de mise en page de texte, comme Aldus PageMaker.
66
+ """
67
+ )
68
+ group.outfile.reset()
69
+ group('help')
70
+ assert group.outfile.out.endswith("avant impression\n")
71
+ group.outfile.reset()
72
+ group('help', 'test')
73
+
57
74
 
58
75
  def test_help_nested():
59
76
  def c(): 'cdoc'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cli2
3
- Version: 2.6.3
3
+ Version: 2.6.4
4
4
  Summary: image:: https://yourlabs.io/oss/cli2/badges/master/pipeline.svg
5
5
  Home-page: https://yourlabs.io/oss/cli2
6
6
  Author: James Pic
@@ -3,7 +3,7 @@ from setuptools import setup
3
3
 
4
4
  setup(
5
5
  name='cli2',
6
- version='2.6.3',
6
+ version='2.6.4',
7
7
  setup_requires='setupmeta',
8
8
  install_requires=['docstring_parser==0.7.1'],
9
9
  extras_require=dict(
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes