"task" is not exported from module "invoke"
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- developer-experience
Research direction
Start by inspecting the main init.py export surface and compare the proposed change with the discussion in issue 814. Verify that from invoke import task is recognized by Pylance without breaking the existing public imports; the issue is done when the warning is resolved and the package's exports remain correct.
Written by the indexing model from the issue text.
Description
I am using vscode. I get a pylance warning:
"task" is not exported from module "invoke"
This is from this line:
from invoke import task
It all works, but is a little annoying.
I'm not sure the sophisticated way to do it in a library, but you could add a complete __all__= in your main __init__.py.
For instace:
# At bottom of __init__.py
__all__ = (
"__version_info__",
"__version__",
"AmbiguousEnvVar",
"Argument",
"AuthFailure",
"Call",
"Collection",
"CollectionNotFound",
"CommandTimedOut",
"Config",
"Context",
"Exit",
"Executor",
"FailingResponder",
"Failure",
"FilesystemLoader",
"Local",
"MockContext",
"ParseError",
"Parser",
"ParserContext",
"ParseResult",
"PlatformError",
"Program",
"Promise",
"pty_size",
"Responder",
"ResponseNotAccepted",
"Result",
"Runner",
"run",
"StreamWatcher",
"SubprocessPipeError",
"sudo",
"task",
"Task",
"call",
"ThreadException",
"UncastableEnvVar",
"UnexpectedExit",
"UnknownFileType",
"UnpicklableConfigMember",
"WatcherError",
)
This is also covered in https://github.com/pyinvoke/invoke/issues/814, but I think the solution mentioned there is not ideal.
- Dominant language
- Python
- Stars
- 4.8k
- Forks
- 412
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pyinvoke/invoke
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100