No overloads for "raises" match the provided arguments: Type[Exception] #1003
Labels
bug
Something isn't working
fixed in next version (main)
A fix has been implemented and will appear in an upcoming version
Getting a false positive of
No overloads for "raises" match the provided arguments"
if I passtype(exception)
to a method, whereas using an intermediate variable does not raise the error.Environment data
Expected behaviour
Neither line should show an error.
Actual behaviour
pytest.raises(type(exception))
is flagged as an error,pytest.raises(exception_type)
is not.Logs
Code Snippet / Additional information
NOTE: test block simplified for sample
The text was updated successfully, but these errors were encountered: