Skip to content

Commit

Permalink
Add __all__ to export classes properly
Browse files Browse the repository at this point in the history
  • Loading branch information
parmenashp authored Nov 9, 2022
1 parent f4f7568 commit 1afb0af
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 0 deletions.
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

0 comments on commit 1afb0af

Please sign in to comment.