mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-python
synced 2026-01-15 09:53:32 +01:00
Fix errors reported by mypy
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
f3ba709d21
commit
bfd0544ff8
13 changed files with 68 additions and 71 deletions
|
|
@ -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}')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue