Skip to content

Commit

Permalink
fix: @timeout cannot be parsed
Browse files Browse the repository at this point in the history
  • Loading branch information
xixixiba committed Jan 29, 2024
1 parent f1a6a8d commit da787ec
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ class Marker:
# ParenthesisClose marker - end of a placeholder
ParenthesisClose = "}}"

def extract_timeout_value(raw_timeout: str) -> int:
match = re.search(r'@timeout:?(\d+)s', raw_timeout, re.IGNORECASE)
if match:
return int(match.group(1))
return None


def auto_convert_types(func):
@wraps(func)
Expand Down

0 comments on commit da787ec

Please sign in to comment.