mypy
mypy copied to clipboard
`isinstance` doesn't narrow when using union
This seems specific to | None. If you do assert isinstance(a, int | list) instead, it correctly narrows to int.
@SakshiSingh25 Start here: https://github.com/python/mypy/blob/master/CONTRIBUTING.md
This issue is likely due to strict_optional in some way, so search for that.