Fix Python errors reported by mypy

This commit fixes Python errors and warnings reported by static type checking
with mypy.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2020-04-10 14:17:15 +02:00
commit 952bf4a4e1
9 changed files with 15 additions and 13 deletions

View file

@ -255,7 +255,7 @@ if __name__ == '__main__':
# ------------- testbed calculator
from string import atof
from locale import atof
class Calculator(ShuntingYard):
@ -288,7 +288,7 @@ if __name__ == '__main__':
super(Calculator, self).__init__(operators)
rr = Calculator().eval("( 2 * 3 + 4 * 5 ) / ( 5 - 3 )")
self.debug("Result =", rr)
print("Result =", rr)
# ------------- testbed match object
@ -335,4 +335,4 @@ if __name__ == '__main__':
obj = Object("hans", "wurst")
r = Matcher(obj).eval("name=hans and (not label~=worst)")
self.debug("Result =", r)
print("Result =", r)