d-e-s-o / argcomp Goto Github PK
View Code? Open in Web Editor NEWA drop-in replacement for Python's argparse module, providing automatic argument completion support.
A drop-in replacement for Python's argparse module, providing automatic argument completion support.
With the following file: (intentionally simple to makes sure it wasn't something funny I was doing.)
from deso.argcomp import CompletingArgumentParser as ArgumentParser
parser = ArgumentParser()
args = parser.parse_args()
I got this error:
# python3 test.py --_complete
Traceback (most recent call last):
File "test.py", line 4, in <module>
args = parser.parse_args()
File "/usr/local/lib/python3.7/dist-packages/deso/argcomp/parser.py", line 390, in wrapper
return function(self, *args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/deso/argcomp/parser.py", line 445, in parse_args
return self._parseArgs(super().parse_args, args, namespace)
File "/usr/local/lib/python3.7/dist-packages/deso/argcomp/parser.py", line 439, in _parseArgs
return parse_func(args=args, namespace=namespace)
File "/usr/lib/python3.7/argparse.py", line 1764, in parse_args
args, argv = self.parse_known_args(args, namespace)
File "/usr/local/lib/python3.7/dist-packages/deso/argcomp/parser.py", line 388, in wrapper
return getattr(super_, function.__name__)(*args, **kwargs)
File "/usr/lib/python3.7/argparse.py", line 1796, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
File "/usr/lib/python3.7/argparse.py", line 2002, in _parse_known_args
start_index = consume_optional(start_index)
File "/usr/lib/python3.7/argparse.py", line 1942, in consume_optional
take_action(action, args, option_string)
File "/usr/lib/python3.7/argparse.py", line 1870, in take_action
action(self, namespace, argument_values, option_string)
File "/usr/local/lib/python3.7/dist-packages/deso/argcomp/parser.py", line 282, in __call__
index, script, *words = values
ValueError: not enough values to unpack (expected at least 2, got 0)
Ubuntu 19.10, Python 3.7.5, argcompd==0.9.0.1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.