Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename parse.retree.BaseVisitor to pass-through #500

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aas_core_codegen/parse/retree/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
Visitor = _types.Visitor
Transformer = _types.Transformer

BaseVisitor = _visitor.BaseVisitor
PassThroughVisitor = _visitor.PassThroughVisitor

dump = _stringify.dump

Expand Down
2 changes: 1 addition & 1 deletion aas_core_codegen/parse/retree/_fix.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
)


class _FixForUTF16Regex(retree_visitor.BaseVisitor):
class _FixForUTF16Regex(retree_visitor.PassThroughVisitor):
"""
Modify the pattern in-place so that UTF-32 can be dealt by UTF-16-only regex engine.

Expand Down
2 changes: 1 addition & 1 deletion aas_core_codegen/parse/retree/_visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from aas_core_codegen.parse.tree import FormattedValue


class BaseVisitor(Visitor):
class PassThroughVisitor(Visitor):
"""Visit all the nodes recursively without any action."""

def visit_regex(self, node: Regex) -> None:
Expand Down
2 changes: 1 addition & 1 deletion aas_core_codegen/xsd/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def _undo_escaping_backslash_x_u_and_U_in_pattern(pattern: str) -> str:
return "".join(parts)


class _AnchorRemover(parse_retree.BaseVisitor):
class _AnchorRemover(parse_retree.PassThroughVisitor):
"""
Remove anchors from a regex in-place.

Expand Down
Loading