cli2 4.1.2__tar.gz → 4.1.3__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.
- {cli2-4.1.2/cli2.egg-info → cli2-4.1.3}/PKG-INFO +1 -1
- {cli2-4.1.2 → cli2-4.1.3}/cli2/cli.py +1 -1
- {cli2-4.1.2 → cli2-4.1.3/cli2.egg-info}/PKG-INFO +1 -1
- {cli2-4.1.2 → cli2-4.1.3}/setup.py +1 -1
- {cli2-4.1.2 → cli2-4.1.3}/tests/test_cli.py +2 -0
- {cli2-4.1.2 → cli2-4.1.3}/tests/test_command.py +2 -2
- {cli2-4.1.2 → cli2-4.1.3}/MANIFEST.in +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/README.rst +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/classifiers.txt +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/__init__.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/ansible/__init__.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/ansible/action.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/ansible/playbook.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/ansible/variables.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/asyncio.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/cli2.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/client.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/colors.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/configuration.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/decorators.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/display.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/examples/__init__.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/examples/client.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/examples/conf.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/examples/example.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/examples/example_obj.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/examples/nesting.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/examples/obj.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/examples/obj2.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/examples/test.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/lock.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/log.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/node.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/sphinx.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/table.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2/test.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2.egg-info/SOURCES.txt +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2.egg-info/dependency_links.txt +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2.egg-info/entry_points.txt +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2.egg-info/requires.txt +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/cli2.egg-info/top_level.txt +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/setup.cfg +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/tests/test_ansible.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/tests/test_ansible_variables.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/tests/test_asyncio.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/tests/test_client.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/tests/test_configuration.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/tests/test_decorators.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/tests/test_display.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/tests/test_entry_point.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/tests/test_group.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/tests/test_inject.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/tests/test_lock.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/tests/test_node.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/tests/test_restful.py +0 -0
- {cli2-4.1.2 → cli2-4.1.3}/tests/test_table.py +0 -0
|
@@ -1129,7 +1129,7 @@ class Argument:
|
|
|
1129
1129
|
# priority to varkwargs for word= and **{}
|
|
1130
1130
|
last = self.cmd[[*self.cmd.keys()][-1]]
|
|
1131
1131
|
if last is not self and last.param.kind == self.param.VAR_KEYWORD:
|
|
1132
|
-
if re.match('^-?-?[
|
|
1132
|
+
if re.match('^-?-?[\\w]+=', arg):
|
|
1133
1133
|
return
|
|
1134
1134
|
elif arg.startswith('**{') and arg.endswith('}'):
|
|
1135
1135
|
return
|
|
@@ -9,6 +9,8 @@ def test_call():
|
|
|
9
9
|
result = main('cli2.examples.test.example_function', 'x', 'y=z')
|
|
10
10
|
assert "args=('x',)" in result
|
|
11
11
|
assert "kwargs={'y': 'z'}" in result
|
|
12
|
+
result = main('cli2.examples.test.example_function', 'http://?x=bar')
|
|
13
|
+
assert "args=('http://?x=bar',)" in result
|
|
12
14
|
|
|
13
15
|
|
|
14
16
|
def test_doc_by_default(mocker):
|
|
@@ -108,12 +108,12 @@ def test_positional_only_looksahead():
|
|
|
108
108
|
return (one, two)
|
|
109
109
|
cmd = cli2.Command(foo)
|
|
110
110
|
|
|
111
|
-
cmd.parse('
|
|
111
|
+
cmd.parse('z=w', 'three=z', 'x', 'y')
|
|
112
112
|
assert cmd['one'].value == 'x'
|
|
113
113
|
assert cmd['two'].value == ['y']
|
|
114
114
|
assert cmd['three'].value == 'z'
|
|
115
115
|
# make sure it takes weird keywords too
|
|
116
|
-
assert cmd['kwargs'].value['
|
|
116
|
+
assert cmd['kwargs'].value['z'] == 'w'
|
|
117
117
|
|
|
118
118
|
|
|
119
119
|
def test_keyword_only():
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|