Skip to content

Commit c642efc

Browse files
style: Format antifraud_service to comply with ruff
This commit addresses minor formatting issues in the `user/antifraud_service.py` file to align with the project's ruff linting configuration.
1 parent ec72605 commit c642efc

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

promo_code/user/antifraud_service.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,17 @@ def get_verdict(self, user_email: str, promo_id: str) -> typing.Dict:
4646
)
4747
if timeout_seconds:
4848
django.core.cache.cache.set(
49-
cache_key, verdict, timeout=timeout_seconds,
49+
cache_key,
50+
verdict,
51+
timeout=timeout_seconds,
5052
)
5153

5254
return verdict
5355

5456
def _fetch_from_service(
55-
self, user_email: str, promo_id: str,
57+
self,
58+
user_email: str,
59+
promo_id: str,
5660
) -> typing.Dict:
5761
"""
5862
Performs the actual HTTP request with a retry mechanism.
@@ -81,7 +85,8 @@ def _calculate_cache_timeout(
8185
cache_until_str: typing.Optional[str],
8286
) -> typing.Optional[int]:
8387
"""
84-
Safely parses an ISO format date string and returns a cache TTL in seconds.
88+
Safely parses an ISO format date string
89+
and returns a cache TTL in seconds.
8590
"""
8691
if not cache_until_str:
8792
return None

0 commit comments

Comments
 (0)