Open antonio-antuan opened 3 weeks ago
That makes sense. I don't think Ruff is capable of running this today. It will require type inference to know what f
evaluates to, to know which branches are possible. We're working on adding support for type-inference but it will take us a while.
I'd like to have a linter that checks that all variants are covered by match expression. An example:
ruff check ./
reports thatAll checks are passed
. However, if you run the code it raises UnboundLocalError. The way to solve it is simple (I guess): check that all branches are covered. Definitely there can be more complex expression, likecase Foo.A | Foo.B
,case _
which would be great to cover as well.