Give up on the literals
mypy is too stupid to infer them
This commit is contained in:
parent
cabae01f7c
commit
8d49b393c8
@ -43,10 +43,6 @@ SELECTION = 'σ'
|
|||||||
RENAME = 'ρ'
|
RENAME = 'ρ'
|
||||||
ARROW = '➡'
|
ARROW = '➡'
|
||||||
|
|
||||||
BINARY_LITERALS_T = Literal['*', '-', '∪', '∩', '÷', '⋈', '⧑', '⧒', '⧓']
|
|
||||||
|
|
||||||
UNARY_LITERALS_T = Literal['π', 'σ', 'ρ']
|
|
||||||
|
|
||||||
|
|
||||||
b_operators = (PRODUCT, DIFFERENCE, UNION, INTERSECTION, DIVISION,
|
b_operators = (PRODUCT, DIFFERENCE, UNION, INTERSECTION, DIVISION,
|
||||||
JOIN, JOIN_LEFT, JOIN_RIGHT, JOIN_FULL) # List of binary operators
|
JOIN, JOIN_LEFT, JOIN_RIGHT, JOIN_FULL) # List of binary operators
|
||||||
@ -198,7 +194,7 @@ class Variable(Node):
|
|||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class Binary(Node):
|
class Binary(Node):
|
||||||
name: BINARY_LITERALS_T
|
name: str
|
||||||
left: Node
|
left: Node
|
||||||
right: Node
|
right: Node
|
||||||
|
|
||||||
@ -219,7 +215,7 @@ class Binary(Node):
|
|||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class Unary(Node):
|
class Unary(Node):
|
||||||
name: UNARY_LITERALS_T
|
name: str
|
||||||
prop: str
|
prop: str
|
||||||
child: Node
|
child: Node
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user