Skip to content

Commit

Permalink
ruff reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
helylle committed Sep 3, 2024
1 parent ac20eba commit 770b3c2
Show file tree
Hide file tree
Showing 43 changed files with 164 additions and 174 deletions.
2 changes: 1 addition & 1 deletion src/eduid/common/clients/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
from eduid.common.clients.gnap_client import AsyncGNAPClient, GNAPClient
from eduid.common.clients.scim_client import SCIMClient

__all__ = ['AsyncGNAPClient', 'GNAPClient', 'SCIMClient']
__all__ = ["AsyncGNAPClient", "GNAPClient", "SCIMClient"]
2 changes: 1 addition & 1 deletion src/eduid/common/clients/gnap_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
from eduid.common.clients.gnap_client.async_client import AsyncGNAPClient
from eduid.common.clients.gnap_client.sync_client import GNAPClient

__all__ = ['GNAPClient', 'AsyncGNAPClient']
__all__ = ["GNAPClient", "AsyncGNAPClient"]
2 changes: 1 addition & 1 deletion src/eduid/common/clients/scim_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

from eduid.common.clients.scim_client.scim_client import SCIMClient

__all__ = ['SCIMClient']
__all__ = ["SCIMClient"]
1 change: 0 additions & 1 deletion src/eduid/common/config/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@ class ErrorsConfigMixin(BaseModel):


class Pysaml2SPConfigMixin(BaseModel):

# Authn algorithms
authn_sign_alg: str = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
authn_digest_alg: str = "http://www.w3.org/2001/04/xmlenc#sha256"
Expand Down
4 changes: 2 additions & 2 deletions src/eduid/graphdb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from eduid.graphdb.db import BaseGraphDB, Neo4jDB

__all__ = [
'BaseGraphDB',
'Neo4jDB',
"BaseGraphDB",
"Neo4jDB",
]

__author__ = "lundberg"
6 changes: 3 additions & 3 deletions src/eduid/graphdb/groupdb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
from eduid.graphdb.groupdb.user import User

__all__ = [
'GroupDB',
'Group',
'User',
"GroupDB",
"Group",
"User",
]

__author__ = "lundberg"
12 changes: 6 additions & 6 deletions src/eduid/queue/db/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
from eduid.queue.db.queue_item import QueueItem, SenderInfo

__all__ = [
'QueueDB',
'Payload',
'RawPayload',
'TestPayload',
'QueueItem',
'SenderInfo',
"QueueDB",
"Payload",
"RawPayload",
"TestPayload",
"QueueItem",
"SenderInfo",
]

__author__ = "lundberg"
6 changes: 3 additions & 3 deletions src/eduid/queue/db/message/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
from eduid.queue.db.message.payload import EduidInviteEmail, EduidSignupEmail

__all__ = [
'MessageDB',
'EduidInviteEmail',
'EduidSignupEmail',
"MessageDB",
"EduidInviteEmail",
"EduidSignupEmail",
]

__author__ = "lundberg"
2 changes: 1 addition & 1 deletion src/eduid/queue/workers/sink.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Test worker that just logs received items """
"""Test worker that just logs received items"""

import asyncio
import logging
Expand Down
1 change: 0 additions & 1 deletion src/eduid/satosa/scimapi/accr.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ class response(ResponseMicroService):
"""

def __init__(self, config: Mapping[str, Any], internal_attributes: dict[str, Any], *args: Any, **kwargs: Any):

super().__init__(*args, **kwargs)

def process(self, context: satosa.context.Context, data: satosa.internal.InternalData) -> ProcessReturnType:
Expand Down
36 changes: 18 additions & 18 deletions src/eduid/userdb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@
from eduid.userdb.userdb import AmDB, UserDB

__all__ = [
'User',
'UserDB',
'AmDB',
'EventList',
'ToUEvent',
'Profile',
'Nin',
'NinIdentity',
'SvipeIdentity',
'EIDASIdentity',
'MailAddress',
'PhoneNumber',
'OidcIdToken',
'OidcAuthorization',
'Orcid',
'LockedIdentityList',
'MongoDB',
]
"User",
"UserDB",
"AmDB",
"EventList",
"ToUEvent",
"Profile",
"Nin",
"NinIdentity",
"SvipeIdentity",
"EIDASIdentity",
"MailAddress",
"PhoneNumber",
"OidcIdToken",
"OidcAuthorization",
"Orcid",
"LockedIdentityList",
"MongoDB",
]
2 changes: 1 addition & 1 deletion src/eduid/userdb/actions/tou/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
__all__ = [
"ToUUser",
"ToUUserDB",
]
]
10 changes: 6 additions & 4 deletions src/eduid/userdb/admin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ def save_with_backup(self, raw: RawData, dry_run: bool = True) -> Any:

if not os.path.isdir(self._backupbase):
sys.stderr.write(
"\n\nBackup basedir {} not found, "
"running in a container without the volume mounted?\n".format(self._backupbase)
"\n\nBackup basedir {} not found, " "running in a container without the volume mounted?\n".format(
self._backupbase
)
)
sys.exit(1)

Expand Down Expand Up @@ -207,8 +208,9 @@ def _make_backupdir(self, db_coll: str, _id: str) -> str:

if not os.path.isdir(self._backupbase):
sys.stderr.write(
"\n\nBackup basedir {} not found, running in a container "
"without the volume mounted?\n".format(self._backupbase)
"\n\nBackup basedir {} not found, running in a container " "without the volume mounted?\n".format(
self._backupbase
)
)
sys.exit(1)

Expand Down
16 changes: 8 additions & 8 deletions src/eduid/userdb/credentials/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
from eduid.userdb.credentials.password import Password

__all__ = [
'Credential',
'CredentialList',
'Password',
'U2F',
'FidoCredential',
'Webauthn',
'CredentialProofingMethod',
]
"Credential",
"CredentialList",
"Password",
"U2F",
"FidoCredential",
"Webauthn",
"CredentialProofingMethod",
]
12 changes: 6 additions & 6 deletions src/eduid/userdb/db/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# Keep existing imports working
from eduid.userdb.db.sync_db import BaseDB, MongoDB, SaveResult, TUserDbDocument

__all__ = [
'BaseDB',
'MongoDB',
'SaveResult',
'TUserDbDocument',
]
__all__ = [
"BaseDB",
"MongoDB",
"SaveResult",
"TUserDbDocument",
]
6 changes: 3 additions & 3 deletions src/eduid/userdb/group_management/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
from eduid.userdb.group_management.state import GroupInviteState, GroupRole

__all__ = [
'GroupManagementInviteStateDB',
'GroupInviteState',
'GroupRole',
"GroupManagementInviteStateDB",
"GroupInviteState",
"GroupRole",
]

__author__ = "lundberg"
8 changes: 4 additions & 4 deletions src/eduid/userdb/idp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .db import IdPUserDb
from .user import IdPUser

__all__ = [
'IdPUser',
'IdPUserDb',
]
__all__ = [
"IdPUser",
"IdPUserDb",
]
24 changes: 12 additions & 12 deletions src/eduid/userdb/logs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
TeleAdressProofingRelation,
)

__all__ = [
'ProofingLog',
'LetterProofing',
'MailAddressProofing',
'MFATokenProofing',
'OrcidProofing',
'PhoneNumberProofing',
'SeLegProofing',
'SeLegProofingFrejaEid',
'SwedenConnectProofing',
'TeleAdressProofing',
'TeleAdressProofingRelation',
__all__ = [
"ProofingLog",
"LetterProofing",
"MailAddressProofing",
"MFATokenProofing",
"OrcidProofing",
"PhoneNumberProofing",
"SeLegProofing",
"SeLegProofingFrejaEid",
"SwedenConnectProofing",
"TeleAdressProofing",
"TeleAdressProofingRelation",
]

__author__ = "lundberg"
6 changes: 3 additions & 3 deletions src/eduid/userdb/maccapi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from eduid.userdb.maccapi.userdb import ManagedAccount, ManagedAccountDB

__all__ = [
'ManagedAccount',
'ManagedAccountDB',
]
"ManagedAccount",
"ManagedAccountDB",
]
4 changes: 2 additions & 2 deletions src/eduid/userdb/personal_data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from eduid.userdb.personal_data.user import PersonalDataUser

__all__ = [
'PersonalDataUserDB',
'PersonalDataUser',
"PersonalDataUserDB",
"PersonalDataUser",
]

__author__ = "lundberg"
43 changes: 21 additions & 22 deletions src/eduid/userdb/proofing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
)



from eduid.userdb.proofing.element import EmailProofingElement, NinProofingElement, PhoneProofingElement
from eduid.userdb.proofing.state import (
EmailProofingState,
Expand All @@ -26,25 +25,25 @@
from eduid.userdb.proofing.user import ProofingUser

__all__ = [
'EidasProofingUserDB',
'EmailProofingStateDB',
'EmailProofingUserDB',
'LetterProofingStateDB',
'LetterProofingUserDB',
'LookupMobileProofingUserDB',
'OidcProofingStateDB',
'OidcProofingUserDB',
'OrcidProofingStateDB',
'OrcidProofingUserDB',
'PhoneProofingStateDB',
'PhoneProofingUserDB',
'ProofingUser',
'LetterProofingState',
'EmailProofingState',
'OidcProofingState',
'OrcidProofingState',
'PhoneProofingState',
'EmailProofingElement',
'NinProofingElement',
'PhoneProofingElement',
"EidasProofingUserDB",
"EmailProofingStateDB",
"EmailProofingUserDB",
"LetterProofingStateDB",
"LetterProofingUserDB",
"LookupMobileProofingUserDB",
"OidcProofingStateDB",
"OidcProofingUserDB",
"OrcidProofingStateDB",
"OrcidProofingUserDB",
"PhoneProofingStateDB",
"PhoneProofingUserDB",
"ProofingUser",
"LetterProofingState",
"EmailProofingState",
"OidcProofingState",
"OrcidProofingState",
"PhoneProofingState",
"EmailProofingElement",
"NinProofingElement",
"PhoneProofingElement",
]
12 changes: 6 additions & 6 deletions src/eduid/userdb/reset_password/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
from eduid.userdb.reset_password.user import ResetPasswordUser

__all__ = [
'ResetPasswordStateDB',
'ResetPasswordUserDB',
'ResetPasswordState',
'ResetPasswordEmailState',
'ResetPasswordEmailAndPhoneState',
'ResetPasswordUser',
"ResetPasswordStateDB",
"ResetPasswordUserDB",
"ResetPasswordState",
"ResetPasswordEmailState",
"ResetPasswordEmailAndPhoneState",
"ResetPasswordUser",
]
34 changes: 17 additions & 17 deletions src/eduid/userdb/scimapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@
from eduid.userdb.scimapi.userdb import ScimApiUser, ScimApiUserDB

__all__ = [
'ScimApiUser',
'ScimApiUserDB',
'ScimApiGroup',
'ScimApiGroupDB',
'ScimApiEvent',
'ScimApiEventDB',
'ScimApiEventResource',
'ScimApiResourceBase',
'ScimApiName',
'ScimApiEmail',
'ScimApiPhoneNumber',
'ScimApiProfile',
'ScimApiLinkedAccount',
'EventLevel',
'EventStatus',
'GroupExtensions',
]
"ScimApiUser",
"ScimApiUserDB",
"ScimApiGroup",
"ScimApiGroupDB",
"ScimApiEvent",
"ScimApiEventDB",
"ScimApiEventResource",
"ScimApiResourceBase",
"ScimApiName",
"ScimApiEmail",
"ScimApiPhoneNumber",
"ScimApiProfile",
"ScimApiLinkedAccount",
"EventLevel",
"EventStatus",
"GroupExtensions",
]
Loading

0 comments on commit 770b3c2

Please sign in to comment.