fix: resolve CI/CD issues and linting errors
This commit is contained in:
@@ -1,6 +1,4 @@
|
|||||||
"""Regex parser for converting regex patterns to AST nodes."""
|
from typing import Optional, Any
|
||||||
|
|
||||||
from typing import Optional, Union, Any
|
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
@@ -355,7 +353,7 @@ class RegexParser:
|
|||||||
self.pos = end + 1
|
self.pos = end + 1
|
||||||
return RegexNode(
|
return RegexNode(
|
||||||
node_type=NodeType.UNICODE_PROPERTY,
|
node_type=NodeType.UNICODE_PROPERTY,
|
||||||
raw=f'\\p{{{prop}}}')
|
raw=f'\\p{{{prop}}}',
|
||||||
position=self.pos - len(f'\\p{{{prop}}}')
|
position=self.pos - len(f'\\p{{{prop}}}')
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -558,7 +556,6 @@ class RegexParser:
|
|||||||
is_non_capturing=False
|
is_non_capturing=False
|
||||||
)
|
)
|
||||||
elif next_char in 'iDsx':
|
elif next_char in 'iDsx':
|
||||||
flag = next_char
|
|
||||||
self.pos += 1
|
self.pos += 1
|
||||||
children = self._parse_sequence()
|
children = self._parse_sequence()
|
||||||
return RegexNode(
|
return RegexNode(
|
||||||
@@ -592,7 +589,6 @@ class RegexParser:
|
|||||||
|
|
||||||
if char in '*+?':
|
if char in '*+?':
|
||||||
self.pos += 1
|
self.pos += 1
|
||||||
quant_type = char
|
|
||||||
if char == '*':
|
if char == '*':
|
||||||
min_count = 0
|
min_count = 0
|
||||||
max_count = float('inf')
|
max_count = float('inf')
|
||||||
@@ -634,7 +630,6 @@ class RegexParser:
|
|||||||
is_possessive = True
|
is_possessive = True
|
||||||
self.pos += 1
|
self.pos += 1
|
||||||
|
|
||||||
quant_type = '{' + quant_content + '}'
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|||||||
Reference in New Issue
Block a user