Fix F402: rename loop var 'table' to 'tbl' to avoid shadowing SQLAlchemy table import
CI / lint (pull_request) Successful in 5s
CI / typecheck (pull_request) Failing after 20s
CI / test (pull_request) Failing after 31s
CI / build-and-push (pull_request) Has been skipped
CI / deploy-dev (pull_request) Has been skipped
CI / deploy-uat (pull_request) Has been skipped

The for loop variable 'table' shadows the imported SQLAlchemy table()
from line 8. Ruff rule F402 fires when a loop variable shadows an import.
Rename to 'tbl'.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-05-24 18:18:19 +00:00
parent 1c42e4b0af
commit dd8ed4aec1
+2 -2
View File
@@ -18,8 +18,8 @@ from cartsnitch_api.models.user import User, UserStoreAccount
def engine():
eng = create_engine("sqlite:///:memory:")
for table in Base.metadata.tables.values():
for col in table.columns.values():
for tbl in Base.metadata.tables.values():
for col in tbl.columns.values():
sd = col.server_default
if sd is not None:
expr_str = str(sd.expression).lower()