Skip to content

Commit f48e262

Browse files
added async to requirements txt and changed exec -> execute
1 parent a75690f commit f48e262

15 files changed

+21
-20
lines changed

gs/backend/data/data_wrappers/abstract_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ async def delete_by_id(self, obj_id: PK) -> T:
6767
if not obj:
6868
raise ValueError(f"{self.model.__name__} with ID {obj_id} not found.")
6969
# Preserve object state before deleting
70-
obj_copy = self.model(**{c.name: getattr(obj, c.name) for c in obj.__table__.columns})
71-
session.delete(obj)
70+
obj_copy = self.model(**{c.name: getattr(obj, c.name) for c in obj.__table__.columns}) # type: ignore[attr-defined]
71+
session.delete(obj) # type: ignore[unused-coroutine]
7272
await session.commit()
7373
return obj_copy

gs/backend/data/data_wrappers/aro_wrapper/aro_request_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ async def delete_request_by_id(request_id: str) -> list[ARORequest]:
6666
async with get_db_session() as session:
6767
request = await session.get(ARORequest, request_id)
6868
if request:
69-
session.delete(request)
69+
session.delete(request) # type: ignore[unused-coroutine]
7070
await session.commit()
7171
else:
7272
raise ValueError("Request not found, ID does not exist")

gs/backend/data/data_wrappers/aro_wrapper/aro_user_auth_token_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ async def delete_auth_token_by_id(token_id: UUID) -> list[AROUserAuthToken]:
4747
auth_token = await session.get(AROUserAuthToken, token_id)
4848

4949
if auth_token:
50-
session.delete(auth_token)
50+
session.delete(auth_token) # type: ignore[unused-coroutine]
5151
await session.commit()
5252
else:
5353
print("Token does not exist")

gs/backend/data/data_wrappers/aro_wrapper/aro_user_data_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ async def delete_user_by_id(userid: UUID) -> list[AROUsers]:
9292
user = await session.get(AROUsers, userid)
9393

9494
if user:
95-
session.delete(user)
95+
session.delete(user) # type: ignore[unused-coroutine]
9696
await session.commit()
9797
else:
9898
raise ValueError("User ID does not exist")

gs/backend/data/data_wrappers/aro_wrapper/aro_user_login_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ async def delete_login_by_id(loginid: UUID) -> list[AROUserLogin]:
5959
async with get_db_session() as session:
6060
user_login = await session.get(AROUserLogin, loginid)
6161
if user_login:
62-
session.delete(user_login)
62+
session.delete(user_login) # type: ignore[unused-coroutine]
6363
await session.commit()
6464
else:
6565
raise ValueError("Login ID does not exist")

gs/backend/data/data_wrappers/mcc_wrappers/commands_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ async def delete_commands_by_id(command_id: UUID) -> Commands:
4545
command = await session.get(Commands, command_id)
4646
if not command:
4747
raise ValueError("Command not found.")
48-
session.delete(command)
48+
session.delete(command) # type: ignore[unused-coroutine]
4949
await session.commit()
5050
return command

gs/backend/data/data_wrappers/mcc_wrappers/comms_session_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ async def delete_telemetry_by_id(session_id: UUID) -> CommsSession:
4545
comms_session = await session.get(CommsSession, session_id)
4646
if not comms_session:
4747
raise ValueError("Comms session not found.")
48-
session.delete(comms_session)
48+
session.delete(comms_session) # type: ignore[unused-coroutine]
4949
await session.commit()
5050
return comms_session

gs/backend/data/data_wrappers/mcc_wrappers/main_command_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ async def delete_main_command_by_id(command_id: int) -> MainCommand:
4444
command = await session.get(MainCommand, command_id)
4545
if not command:
4646
raise ValueError("Main command not found.")
47-
session.delete(command)
47+
session.delete(command) # type: ignore[unused-coroutine]
4848
await session.commit()
4949
return command

gs/backend/data/data_wrappers/mcc_wrappers/main_telemetry_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ async def delete_main_telemetry_by_id(telemetry_id: int) -> MainTelemetry:
4444
telemetry = await session.get(MainTelemetry, telemetry_id)
4545
if not telemetry:
4646
raise ValueError("Main telemetry not found.")
47-
session.delete(telemetry)
47+
session.delete(telemetry) # type: ignore[unused-coroutine]
4848
await session.commit()
4949
return telemetry

gs/backend/data/data_wrappers/mcc_wrappers/packet_commands_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ async def delete_packet_command_by_id(command_id: UUID) -> PacketCommands:
4545
command = await session.get(PacketCommands, command_id)
4646
if not command:
4747
raise ValueError("Packet command not found.")
48-
session.delete(command)
48+
session.delete(command) # type: ignore[unused-coroutine]
4949
await session.commit()
5050
return command

0 commit comments

Comments
 (0)