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

Add __all__ to export classes properly #52

Merged
merged 1 commit into from
Nov 19, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions InquirerPy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
__all__ = ["prompt", "prompt_async", "get_style"]

from InquirerPy.resolver import prompt, prompt_async
from InquirerPy.utils import get_style
9 changes: 9 additions & 0 deletions InquirerPy/base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
ListPrompt ← ExpandPrompt ...
"""

__all__ = [
"BaseComplexPrompt",
"FakeDocument",
"Choice",
"InquirerPyUIListControl",
"BaseSimplePrompt",
"BaseListPrompt",
]

from .complex import BaseComplexPrompt, FakeDocument
from .control import Choice, InquirerPyUIListControl
from .list import BaseListPrompt
Expand Down
2 changes: 2 additions & 0 deletions InquirerPy/containers/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
__all__ = ["SpinnerWindow"]

from .spinner import SpinnerWindow
14 changes: 14 additions & 0 deletions InquirerPy/inquirer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@

`inquirer` directly interact with individual prompt classes. It’s more flexible, easier to customise and also provides IDE type hintings/completions.
"""

__all__ = [
"checkbox",
"confirm",
"expand",
"filepath",
"fuzzy",
"text",
"select",
"number",
"rawlist",
"secret",
]

from InquirerPy.prompts import CheckboxPrompt as checkbox
from InquirerPy.prompts import ConfirmPrompt as confirm
from InquirerPy.prompts import ExpandPrompt as expand
Expand Down
14 changes: 14 additions & 0 deletions InquirerPy/prompts/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
"""Module contains import of all prompts classes."""

__all__ = [
"CheckboxPrompt",
"ConfirmPrompt",
"ExpandPrompt",
"FilePathPrompt",
"FuzzyPrompt",
"InputPrompt",
"ListPrompt",
"NumberPrompt",
"RawlistPrompt",
"SecretPrompt",
]

from InquirerPy.prompts.checkbox import CheckboxPrompt
from InquirerPy.prompts.confirm import ConfirmPrompt
from InquirerPy.prompts.expand import ExpandPrompt
Expand Down