omlish 0.0.0.dev65__py3-none-any.whl → 0.0.0.dev67__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
omlish/.manifests.json CHANGED
@@ -24,14 +24,14 @@
24
24
  }
25
25
  },
26
26
  {
27
- "module": ".diag.pycharm",
27
+ "module": ".diag.pycharm.cli",
28
28
  "attr": "_CLI_MODULE",
29
- "file": "omlish/diag/pycharm.py",
30
- "line": 141,
29
+ "file": "omlish/diag/pycharm/cli.py",
30
+ "line": 38,
31
31
  "value": {
32
32
  "$omdev.cli.types.CliModule": {
33
33
  "cmd_name": "pycharm",
34
- "mod_name": "omlish.diag.pycharm"
34
+ "mod_name": "omlish.diag.pycharm.cli"
35
35
  }
36
36
  }
37
37
  },
omlish/__about__.py CHANGED
@@ -1,5 +1,5 @@
1
- __version__ = '0.0.0.dev65'
2
- __revision__ = '5f405ca5ade2a31c8cb51891bff37a7bbe18f8b0'
1
+ __version__ = '0.0.0.dev67'
2
+ __revision__ = '9c0328338df429462a1a603795fe20e4a05156ca'
3
3
 
4
4
 
5
5
  #
omlish/argparse.py CHANGED
@@ -187,7 +187,15 @@ class _CliMeta(type):
187
187
  raise NotImplementedError
188
188
  cparser = subparsers.add_parser(obj.name)
189
189
  for arg in (obj.args or []):
190
- cparser.add_argument(*arg.args, **arg.kwargs)
190
+ if (
191
+ len(arg.args) == 1 and
192
+ isinstance(arg.args[0], str) and
193
+ not (n := check.isinstance(arg.args[0], str)).startswith('-') and
194
+ 'metavar' not in arg.kwargs
195
+ ):
196
+ cparser.add_argument(n.replace('-', '_'), **arg.kwargs, metavar=n)
197
+ else:
198
+ cparser.add_argument(*arg.args, **arg.kwargs)
191
199
  cparser.set_defaults(_cmd=obj)
192
200
 
193
201
  elif isinstance(obj, Arg):
File without changes