Skip to content

Commit f10a28c

Browse files
committed
Small format fixes
1 parent efc3cfc commit f10a28c

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

syncmaster/db/repositories/credentials_repository.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ async def read(
3939
result: ScalarResult[AuthData] = await self._session.scalars(query)
4040
return decrypt_auth_data(result.one().value, settings=self._settings)
4141
except NoResultFound as e:
42-
raise AuthDataNotFoundError(f"Connection id = {connection_id}") from e
42+
msg = f"Connection id = {connection_id}"
43+
raise AuthDataNotFoundError(msg) from e
4344

4445
async def read_bulk(
4546
self,

syncmaster/db/repositories/run.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,10 @@ async def create(
6363
try:
6464
self._session.add(run)
6565
await self._session.flush()
66-
return run
6766
except IntegrityError as e:
6867
self._raise_error(e)
68+
else:
69+
return run
6970

7071
async def update(self, run_id: int, **kwargs: Any) -> Run:
7172
try:

syncmaster/schemas/v1/groups.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ def validate_role(cls, values):
3232

3333
if role and not GroupMemberRole.is_public_role(role):
3434
msg = f"Input should be one of: {GroupMemberRole.public_roles_str()}"
35-
raise ValueError(
36-
msg,
37-
)
35+
raise ValueError(msg)
3836
return values
3937

4038

tests/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ class TestSettings(BaseSettings):
123123
TEST_WEBDAV_PASSWORD: str
124124

125125
@model_validator(mode="before")
126+
@classmethod
126127
def check_sid_and_service_name(cls, values):
127128
sid = values.get("TEST_ORACLE_SID")
128129
service_name = values.get("TEST_ORACLE_SERVICE_NAME")

tests/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import asyncio
22
import logging
33
from datetime import UTC, datetime
4-
from pathlib import Path, PurePath, PurePosixPath
4+
from pathlib import Path
55
from typing import Any
6-
from collections.abc import Sequence
76

87
from alembic.autogenerate import compare_metadata
98
from alembic.config import Config

0 commit comments

Comments
 (0)