You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/home/sylvain/.virtualenvs/fabric-nas/bin/fab", line 8, in <module>
sys.exit(program.run())
File "/home/sylvain/.virtualenvs/fabric-nas/lib/python3.8/site-packages/invoke/program.py", line 373, in run
self.parse_collection()
File "/home/sylvain/.virtualenvs/fabric-nas/lib/python3.8/site-packages/invoke/program.py", line 465, in parse_collection
self.load_collection()
File "/home/sylvain/.virtualenvs/fabric-nas/lib/python3.8/site-packages/fabric/main.py", line 87, in load_collection
super(Fab, self).load_collection()
File "/home/sylvain/.virtualenvs/fabric-nas/lib/python3.8/site-packages/invoke/program.py", line 696, in load_collection
module, parent = loader.load(coll_name)
File "/home/sylvain/.virtualenvs/fabric-nas/lib/python3.8/site-packages/invoke/loader.py", line 76, in load
module = imp.load_module(name, fd, path, desc)
File "/usr/lib/python3.8/imp.py", line 234, in load_module
return load_source(name, filename, file)
File "/usr/lib/python3.8/imp.py", line 171, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 702, in _load
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/sylvain/Dev/fabric-nas/fabfile.py", line 2, in <module>
from lib import system
File "/home/sylvain/Dev/fabric-nas/lib/system.py", line 5, in <module>
def hostname(c, hostname: str):
File "/home/sylvain/.virtualenvs/fabric-nas/lib/python3.8/site-packages/fabric/tasks.py", line 71, in task
return invoke.task(*args, **kwargs)
File "/home/sylvain/.virtualenvs/fabric-nas/lib/python3.8/site-packages/invoke/tasks.py", line 325, in task
return klass(args[0], **kwargs)
File "/home/sylvain/.virtualenvs/fabric-nas/lib/python3.8/site-packages/fabric/tasks.py", line 21, in __init__
super(Task, self).__init__(*args, **kwargs)
File "/home/sylvain/.virtualenvs/fabric-nas/lib/python3.8/site-packages/invoke/tasks.py", line 76, in __init__
self.positional = self.fill_implicit_positionals(positional)
File "/home/sylvain/.virtualenvs/fabric-nas/lib/python3.8/site-packages/invoke/tasks.py", line 167, in fill_implicit_positionals
args, spec_dict = self.argspec(self.body)
File "/home/sylvain/.virtualenvs/fabric-nas/lib/python3.8/site-packages/invoke/tasks.py", line 153, in argspec
spec = inspect.getargspec(func)
File "/usr/lib/python3.8/inspect.py", line 1083, in getargspec
raise ValueError("Function has keyword-only parameters or annotations"
ValueError: Function has keyword-only parameters or annotations, use inspect.signature() API which can support them
Can typing be supported in invoke?
The text was updated successfully, but these errors were encountered:
I would like to use python3 typing on my tasks, e.g.:
However, it fails with the following error:
Can typing be supported in invoke?
The text was updated successfully, but these errors were encountered: