Skip to content

Commit 738a1e6

Browse files
committed
added return type hint to rate limit validator
1 parent 8413fed commit 738a1e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/schemas/rate_limit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class RateLimitBase(BaseModel):
2424
]
2525

2626
@field_validator('path')
27-
def validate_and_sanitize_path(cls, v: str):
27+
def validate_and_sanitize_path(cls, v: str) -> str:
2828
return sanitize_path(v)
2929

3030

@@ -68,7 +68,7 @@ class RateLimitUpdate(BaseModel):
6868
name: str | None = None
6969

7070
@field_validator('path')
71-
def validate_and_sanitize_path(cls, v: str):
71+
def validate_and_sanitize_path(cls, v: str) -> str:
7272
return sanitize_path(v) if v is not None else None
7373

7474

0 commit comments

Comments
 (0)