Skip to content

Commit 05880c0

Browse files
committed
feat:fixing the issues from sourcery AI and Copilot
1 parent 10111cb commit 05880c0

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,3 +227,9 @@ tests/output/*
227227
*.modified.yaml
228228
.netrc
229229
.idea/*
230+
231+
# Security: Exclude all private key files
232+
*.pem
233+
*.key
234+
*.p12
235+
*.pfx

pro_tes/api/middlewares/controllers.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,12 @@ def UpdateMiddleware(middleware_id: str) -> dict:
337337
update_dict["order"] = new_order # type: ignore[assignment]
338338

339339
if update_data.config is not None:
340-
update_dict["config"] = update_data.config # type: ignore[assignment]
340+
# type: ignore[assignment]
341+
update_dict["config"] = update_data.config
341342

342343
if update_data.enabled is not None:
343-
update_dict["enabled"] = update_data.enabled # type: ignore[assignment]
344+
# type: ignore[assignment]
345+
update_dict["enabled"] = update_data.enabled
344346

345347
update_dict["updated_at"] = datetime.utcnow().isoformat() + "Z"
346348

pro_tes/api/middlewares/models.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,12 @@ class MiddlewareOrder(BaseModel):
276276
...,
277277
min_length=1,
278278
description="Array of middleware IDs in desired execution order",
279-
json_schema_extra={"example": ["507f1f77bcf86cd799439011", "507f1f77bcf86cd799439012"]}
279+
json_schema_extra={
280+
"example": [
281+
"507f1f77bcf86cd799439011",
282+
"507f1f77bcf86cd799439012"
283+
]
284+
}
280285
)
281286

282287

0 commit comments

Comments
 (0)