Skip to content

Commit

Permalink
manubot#337 Add init method to handler.
Browse files Browse the repository at this point in the history
  • Loading branch information
xihh87 committed Jun 15, 2022
1 parent 6597e47 commit 8877762
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions manubot/cite/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ class Handler:
prefixes = []
timeout_seconds: int = 3

def __init__(self, prefix_lower: str, prefixes=[], timeout_seconds: int = 3):
self.prefix_lower: prefix_lower
self.prefixes = prefixes
self.timeout_seconds: int = timeout_seconds

def _get_pattern(self, attribute: str = "accession_pattern") -> Optional[Pattern]:
"""
Return a compiled regex pattern stored by `attribute`.
Expand Down

0 comments on commit 8877762

Please sign in to comment.