-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from icgood/config
Reorganize to allow config object
- Loading branch information
Showing
25 changed files
with
398 additions
and
300 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
``pysasl.config`` Package | ||
========================= | ||
|
||
.. automodule:: pysasl.config | ||
:members: |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
``pysasl.mechanism`` Package | ||
============================ | ||
|
||
.. automodule:: pysasl.mechanism | ||
:members: | ||
|
||
.. automodule:: pysasl.mechanism.plain | ||
:members: | ||
|
||
.. automodule:: pysasl.mechanism.login | ||
:members: | ||
|
||
.. automodule:: pysasl.mechanism.crammd5 | ||
:members: | ||
|
||
.. automodule:: pysasl.mechanism.oauth | ||
:members: | ||
|
||
.. automodule:: pysasl.mechanism.external | ||
:members: |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
from dataclasses import dataclass | ||
from typing_extensions import Final | ||
|
||
from .prep import default_prep, Preparation | ||
|
||
__all__ = ['SASLConfig', 'default_config'] | ||
|
||
|
||
@dataclass(frozen=True) | ||
class SASLConfig: | ||
"""Provides any configuration necessary for | ||
:class:`~pysasl.mechanism.ServerMechanism` or | ||
:class:`~pysasl.mechanism.ClientMechanism` instances. | ||
""" | ||
|
||
prepare: Preparation = default_prep | ||
"""The preparation algorithm function.""" | ||
|
||
|
||
@dataclass(frozen=True, init=False, repr=False) | ||
class _DefaultConfig(SASLConfig): | ||
|
||
def __init__(self) -> None: | ||
super().__init__() | ||
|
||
def __repr__(self) -> str: | ||
return 'SASLConfig()' | ||
|
||
|
||
#: A configuration instance with all defaults. | ||
default_config: Final = _DefaultConfig() |
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
Oops, something went wrong.