Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly re-export names from top-level package using __all__ #981

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 58 additions & 13 deletions invoke/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,55 @@
__all__ = (
"AmbiguousEnvVar",
"Argument",
"AuthFailure",
"Call",
"Collection",
"CollectionNotFound",
"CommandTimedOut",
"Config",
"Context",
"Executor",
"Exit",
"FailingResponder",
"Failure",
"FilesystemLoader",
"Local",
"MockContext",
"ParseError",
"ParseResult",
"Parser",
"ParserContext",
"PlatformError",
"Program",
"Promise",
"Responder",
"ResponseNotAccepted",
"Result",
"Runner",
"StreamWatcher",
"SubprocessPipeError",
"Task",
"ThreadException",
"UncastableEnvVar",
"UnexpectedExit",
"UnknownFileType",
"UnpicklableConfigMember",
"WatcherError",
"__version__",
"__version_info__",
"call",
"pty_size",
"task",
)


from typing import Any, Optional

from ._version import __version_info__, __version__ # noqa
from .collection import Collection # noqa
from .config import Config # noqa
from .context import Context, MockContext # noqa
from .exceptions import ( # noqa
from ._version import __version_info__, __version__
from .collection import Collection
from .config import Config
from .context import Context, MockContext
from .exceptions import (
AmbiguousEnvVar,
AuthFailure,
CollectionNotFound,
Expand All @@ -21,14 +66,14 @@
WatcherError,
CommandTimedOut,
)
from .executor import Executor # noqa
from .loader import FilesystemLoader # noqa
from .parser import Argument, Parser, ParserContext, ParseResult # noqa
from .program import Program # noqa
from .runners import Runner, Local, Failure, Result, Promise # noqa
from .tasks import task, call, Call, Task # noqa
from .terminals import pty_size # noqa
from .watchers import FailingResponder, Responder, StreamWatcher # noqa
from .executor import Executor
from .loader import FilesystemLoader
from .parser import Argument, Parser, ParserContext, ParseResult
from .program import Program
from .runners import Runner, Local, Failure, Result, Promise
from .tasks import task, call, Call, Task
from .terminals import pty_size
from .watchers import FailingResponder, Responder, StreamWatcher


def run(command: str, **kwargs: Any) -> Optional[Result]:
Expand Down