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
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user