Skip to content

Missing return statement after a call to quit() #6661

Description

@johnwspirent

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions