I am getting "Missing return statement" with the following: def foo() -> str: try: with open('bar.txt') as file: return '' except FileNotFoundError as error: print(error) quit() Is this correct behaviour? (MyPy 0.670, Python 3.7.1)
I am getting "Missing return statement" with the following:
def foo() -> str:
try:
with open('bar.txt') as file:
return ''
except FileNotFoundError as error:
print(error)
quit()
Is this correct behaviour? (MyPy 0.670, Python 3.7.1)