mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-22 06:13:25 -07:00
Update tokenize-rt==5.2.0
This commit is contained in:
parent
7d02f3ee95
commit
6a5eeca39f
1 changed files with 4 additions and 1 deletions
|
@ -18,7 +18,7 @@ if ( # pragma: no branch
|
|||
callable(getattr(tokenize, '_compile', None))
|
||||
): # pragma: <3.10 cover
|
||||
from functools import lru_cache
|
||||
tokenize._compile = lru_cache()(tokenize._compile)
|
||||
tokenize._compile = lru_cache(tokenize._compile)
|
||||
|
||||
ESCAPED_NL = 'ESCAPED_NL'
|
||||
UNIMPORTANT_WS = 'UNIMPORTANT_WS'
|
||||
|
@ -40,6 +40,9 @@ class Token(NamedTuple):
|
|||
def offset(self) -> Offset:
|
||||
return Offset(self.line, self.utf8_byte_offset)
|
||||
|
||||
def matches(self, *, name: str, src: str) -> bool:
|
||||
return self.name == name and self.src == src
|
||||
|
||||
|
||||
_string_re = re.compile('^([^\'"]*)(.*)$', re.DOTALL)
|
||||
_escaped_nl_re = re.compile(r'\\(\n|\r\n|\r)')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue