Fix errors reported by mypy

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2025-10-13 12:45:51 +02:00
commit bfd0544ff8
13 changed files with 68 additions and 71 deletions

View file

@ -5,12 +5,6 @@ from collections import namedtuple
from ..log import *
# --- python 2 / 3 compatibility stuff
try:
basestring # type: ignore
except NameError:
basestring = str
L, R = 'Left Right'.split()
ARG, KEYW, QUOTED, LPAREN, RPAREN = 'arg kw quoted ( )'.split()
@ -252,7 +246,7 @@ class ShuntingYard(object): # export
return vals.pop()
def eval(self, infix):
if not isinstance(infix, basestring):
if not isinstance(infix, str):
return infix
postfix = self.infix_to_postfix(infix)
self.debug(f'"{infix}" --> {postfix}')