Skip to content

Commit f2c86dd

Browse files
author
Andrei Neagu
committed
mypy
1 parent 7cd99a4 commit f2c86dd

File tree

1 file changed

+4
-4
lines changed
  • packages/postgres-database/src/simcore_postgres_database

1 file changed

+4
-4
lines changed

packages/postgres-database/src/simcore_postgres_database/utils_users.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
""" Free functions, repository pattern, errors and data structures for the users resource
2-
i.e. models.users main table and all its relations
1+
"""Free functions, repository pattern, errors and data structures for the users resource
2+
i.e. models.users main table and all its relations
33
"""
44

55
import re
@@ -65,7 +65,7 @@ async def new_user(
6565
user_id = await conn.scalar(
6666
users.insert().values(**data).returning(users.c.id)
6767
)
68-
except UniqueViolation: # noqa: PERF203
68+
except UniqueViolation:
6969
data["name"] = generate_alternative_username(data["name"])
7070

7171
result = await conn.execute(
@@ -78,7 +78,7 @@ async def new_user(
7878
).where(users.c.id == user_id)
7979
)
8080
row = await result.first()
81-
assert row # nosec
81+
assert isinstance(row, RowProxy) # nosec
8282
return row
8383

8484
@staticmethod

0 commit comments

Comments
 (0)