wizlib 3.1.2__py3-none-any.whl → 3.1.3__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.

Potentially problematic release.


This version of wizlib might be problematic. Click here for more details.

wizlib/app.py CHANGED
@@ -70,15 +70,18 @@ class WizApp:
70
70
  """Set up the parser for the app class"""
71
71
  cls.parser = WizParser(prog=cls.name)
72
72
  subparsers = cls.parser.add_subparsers(dest='command')
73
+ cls.dparser = WizParser(prog=f"{cls.name} {cls.base.default}")
73
74
  for command in cls.base.family_members('name'):
74
75
  key = command.get_member_attr('key')
75
76
  aliases = [key] if key else []
76
77
  subparser = subparsers.add_parser(command.name, aliases=aliases)
77
78
  if command.name == cls.base.default:
78
- cls.dparser = subparser
79
+ command.add_args(cls.dparser)
79
80
  command.add_args(subparser)
80
81
  for handler in cls.handlers:
81
82
  handler.add_args(cls.parser)
83
+ # Throws ArgumentError if the default command includes an optional
84
+ # argument that overlaps with one of the handlers
82
85
  handler.add_args(cls.dparser)
83
86
 
84
87
  def __init__(self, **vals):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wizlib
3
- Version: 3.1.2
3
+ Version: 3.1.3
4
4
  Summary: Framework for flexible and powerful command-line applications
5
5
  License: MIT
6
6
  Author: Steampunk Wizard
@@ -1,5 +1,5 @@
1
1
  wizlib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- wizlib/app.py,sha256=imR_lfyQtYzKObu1tLZVGgJQGmdz43M7E9qAMMokyD4,3962
2
+ wizlib/app.py,sha256=ke0NbaYC6ArmdtLTySl6VIGIGicxTsIuzW9wag6b7rU,4180
3
3
  wizlib/class_family.py,sha256=tORSVAaPeWTQMcz2DX-MQClj1GQR3vCmkALPXxHa_pk,4506
4
4
  wizlib/command.py,sha256=NO1558EYuXxfkpSmX6ljjzae8n8g4w6yytZKTJtigvo,1708
5
5
  wizlib/config_handler.py,sha256=hoDavSMiGM_7PAHI8XIwC8nxPWOZDk302ryyjluoLGg,2588
@@ -14,6 +14,6 @@ wizlib/ui/shell/line_editor.py,sha256=frpsqU5NggcvEz3XeB8YyqgmlExlyx6K1CKPzvARtP
14
14
  wizlib/ui/shell_ui.py,sha256=f2GErMJg09GPZDS4uK0q8Qq8WEssQFP1dqQyg4ycznI,2029
15
15
  wizlib/ui_handler.py,sha256=JoZadtw9DKAtGvHKP3_BJF2NaYqmcQYNdsY4PeRnOjg,634
16
16
  wizlib/util.py,sha256=x1SyL3iXot0ET2r8Jjb2ySTd_J-3Uu7J1b_CHvFgzew,156
17
- wizlib-3.1.2.dist-info/METADATA,sha256=4HzwBU_sp2F4ycdTb1XvCTDO5i7DeIMdOhl63JfCzNs,1780
18
- wizlib-3.1.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
19
- wizlib-3.1.2.dist-info/RECORD,,
17
+ wizlib-3.1.3.dist-info/METADATA,sha256=-_2ffHkPTtfdyobotsG2RFCTIwAeAWpfwk45WCSgAYo,1780
18
+ wizlib-3.1.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
19
+ wizlib-3.1.3.dist-info/RECORD,,
File without changes