Commit 4f8dfc01 authored by Nsukami Patrick's avatar Nsukami Patrick
Browse files

[black] Format without any compromise

parent e6108b6d8056
Pipeline #97027 passed with stages
in 2 minutes and 26 seconds
......@@ -174,6 +174,7 @@ class HasOperatorAttribute(Protocol):
) -> str:
...
# AnyScopeNode is the Union of all ScopeNode child classes
AnyScopeNode = Union_[
"rql.stmts.Set",
......
......@@ -354,10 +354,7 @@ class Union(Statement, Node):
def tr(msg, context=None):
return msg
return [
c.get_description(mainindex, tr)
for c in self.children
]
return [c.get_description(mainindex, tr) for c in self.children]
# repr / as_string / copy #################################################
......@@ -471,6 +468,7 @@ class Union(Statement, Node):
@property
def undo_manager(self) -> "rql.undo.SelectionManager":
from rql.undo import SelectionManager
undo_manager = getattr(self, "_undo_manager", None)
if undo_manager:
return undo_manager
......@@ -504,6 +502,7 @@ class Union(Statement, Node):
def append_select(self, select: "rql.stmts.Select") -> None:
if self.should_register_op:
from rql.undo import AppendSelectOperation
self.undo_manager.add_operation(AppendSelectOperation(self, select))
self.children.append(select)
......@@ -511,6 +510,7 @@ class Union(Statement, Node):
idx: int = self.children.index(select)
if self.should_register_op:
from rql.undo import RemoveSelectOperation
self.undo_manager.add_operation(RemoveSelectOperation(self, select, idx))
self.children.pop(idx)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment