Give up on the literals

mypy is too stupid to infer them
master
Salvo 'LtWorf' Tomaselli 2020-08-12 15:16:58 +07:00
parent cabae01f7c
commit 8d49b393c8
No known key found for this signature in database
GPG Key ID: B3A7CF0C801886CF
1 changed files with 2 additions and 6 deletions

@ -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