Assert to make mypy happy

master
Salvo 'LtWorf' Tomaselli 2020-06-27 15:51:00 +07:00
parent e5dad02397
commit f21a7beb41
No known key found for this signature in database
GPG Key ID: B3A7CF0C801886CF
1 changed files with 1 additions and 0 deletions

@ -287,6 +287,7 @@ def parse_tokens(expression: List[Union[list, str]]) -> Node:
# The list contains only 1 string. Means it is the name of a relation
if len(expression) == 1:
assert isinstance(expression[0], str)
if not rtypes.is_valid_relation_name(expression[0]):
raise ParserException(
f'{expression[0]!r} is not a valid relation name')