Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 47bf4a3

Browse files
committed
Fixed small things from coderabbit review
1 parent ef9babd commit 47bf4a3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

flask_utils/decorators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def _is_allow_empty(value: Any, type_hint: Type) -> bool: # type: ignore
8686
.. versionadded:: 0.2.0
8787
"""
8888
if not value:
89-
# Check if type is explicitly Optional or allow_empty is True
89+
# Check if type is explicitly Optional
9090
if _is_optional(type_hint):
9191
return True
9292
return False

tests/test_validate_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ def optional(name: str, age: Optional[int]):
292292
return "OK", 200
293293

294294
def test_valid_request(self, client):
295-
# response = client.post("/optional", json={"name": "John", "age": 25})
296-
# assert response.status_code == 200
295+
response = client.post("/optional", json={"name": "John", "age": 25})
296+
assert response.status_code == 200
297297

298298
response = client.post("/optional", json={"name": "John"})
299299
assert response.status_code == 200

0 commit comments

Comments
 (0)