-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
34 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,24 @@ | ||
"""API available for general public usage. | ||
"""Public API available for general usage. | ||
The function ``activate`` in each submodule of the :obj:`ini2toml.plugins` package | ||
is also considered part of the public API. | ||
In addition to the classes and functions "exported" by this module, the following are | ||
also part of the public API: | ||
- The public members of the :mod:`~ini2toml.types` module. | ||
- The public members of the :mod:`~ini2toml.errors` module. | ||
- The ``activate`` function in each submodule of the :obj:`~ini2toml.plugins` package | ||
Please notice there might be classes of similar names exported by both ``api`` and | ||
``types``. When this happens, the classes in ``types`` are not concrete implementations, | ||
but instead act as :class:`protocols <typing.Protocol>` (i.e. abstract descriptions | ||
for checking `structural polymorphism`_ during static analysis). | ||
These should be preferred when writing type hints and signatures. | ||
Plugin authors can also rely on the functions exported by | ||
:mod:`~ini2toml.transformations`. | ||
.. _structural polymorphism: https://www.python.org/dev/peps/pep-0544/ | ||
""" | ||
from .plugins import ErrorLoadingPlugin | ||
from .translator import ( | ||
AlreadyRegisteredAugmentation, | ||
InvalidAugmentationName, | ||
Translator, | ||
UndefinedProfile, | ||
) | ||
from .types import Commented, CommentedKV, CommentedList, Profile | ||
from . import errors, transformations, types | ||
from .translator import Translator | ||
|
||
__all__ = [ | ||
"Commented", | ||
"CommentedKV", | ||
"CommentedList", | ||
"Translator", | ||
"Profile", | ||
"UndefinedProfile", | ||
"InvalidAugmentationName", | ||
"AlreadyRegisteredAugmentation", | ||
"ErrorLoadingPlugin", | ||
] | ||
__all__ = ["Translator", "errors", "types", "transformations"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters