afonasev / flake8-return

Flake8 plugin for return expressions checking.
MIT License
62 stars 69 forks source link

Should allow raise at end of function, in addition to assert #111

Open vectro opened 2 years ago

vectro commented 2 years ago

flake8-return version 1.1.3 allows this construct

def myfunc(x):
    if x == 5:
        return None
    assert False

but disallows this one

def myfunc(x):
    if x == 5:
        return None
    raise NotImplementedError()

I think they should be treated the same?