diff --git a/PFERD/auth/__init__.py b/PFERD/auth/__init__.py index 39f7f5c..eff8370 100644 --- a/PFERD/auth/__init__.py +++ b/PFERD/auth/__init__.py @@ -17,10 +17,10 @@ AuthConstructor = Callable[[ AUTHENTICATORS: Dict[str, AuthConstructor] = { "credential-file": lambda n, s, c: CredentialFileAuthenticator(n, CredentialFileAuthSection(s)), + "keyring": lambda n, s, c: + KeyringAuthenticator(n, KeyringAuthSection(s)), "simple": lambda n, s, c: SimpleAuthenticator(n, SimpleAuthSection(s)), "tfa": lambda n, s, c: TfaAuthenticator(n), - "keyring": lambda n, s, c: - KeyringAuthenticator(n, KeyringAuthSection(s)), } diff --git a/PFERD/auth/authenticator.py b/PFERD/auth/authenticator.py index fe14909..f588bc4 100644 --- a/PFERD/auth/authenticator.py +++ b/PFERD/auth/authenticator.py @@ -17,10 +17,7 @@ class AuthSection(Section): class Authenticator(ABC): - def __init__( - self, - name: str - ) -> None: + def __init__(self, name: str) -> None: """ Initialize an authenticator from its name and its section in the config file. diff --git a/PFERD/auth/keyring.py b/PFERD/auth/keyring.py index c7ca2c2..c14f6fb 100644 --- a/PFERD/auth/keyring.py +++ b/PFERD/auth/keyring.py @@ -18,11 +18,7 @@ class KeyringAuthSection(AuthSection): class KeyringAuthenticator(Authenticator): - def __init__( - self, - name: str, - section: KeyringAuthSection, - ) -> None: + def __init__(self, name: str, section: KeyringAuthSection) -> None: super().__init__(name) self._username = section.username() diff --git a/PFERD/auth/simple.py b/PFERD/auth/simple.py index d2f4123..831c12f 100644 --- a/PFERD/auth/simple.py +++ b/PFERD/auth/simple.py @@ -14,11 +14,7 @@ class SimpleAuthSection(AuthSection): class SimpleAuthenticator(Authenticator): - def __init__( - self, - name: str, - section: SimpleAuthSection, - ) -> None: + def __init__(self, name: str, section: SimpleAuthSection) -> None: super().__init__(name) self._username = section.username() diff --git a/PFERD/auth/tfa.py b/PFERD/auth/tfa.py index 28ba150..26b1383 100644 --- a/PFERD/auth/tfa.py +++ b/PFERD/auth/tfa.py @@ -6,10 +6,7 @@ from .authenticator import Authenticator, AuthError class TfaAuthenticator(Authenticator): - def __init__( - self, - name: str, - ) -> None: + def __init__(self, name: str) -> None: super().__init__(name) async def username(self) -> str: