Skip to content

Commit

Permalink
Add types to lex.RE
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Jul 11, 2024
1 parent afa75b5 commit d225e9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pytools/lex.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ def __str__(self):


class RE:
def __init__(self, s, flags=0):
def __init__(self, s: str, flags: int = 0) -> None:
self.Content = s
self.RE = re.compile(s, flags)

def __repr__(self):
def __repr__(self) -> str:
return f"RE({self.Content})"


Expand Down

0 comments on commit d225e9f

Please sign in to comment.