You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Anyway, I was working on a fix for #2998, and I just happened to stumble upon ErrorType. It seemed like the perfect potential solution: make an uninferred variable of type ErrorType, that way you won't get future errors deriving from it. Just to see, though I ran ucg ErrorType over mypy's codebase. Only instances I found were:
Its declaration in types.py.
All the various visitors.
A bunch of if isinstance(xyz, ErrorType): return ErrorType() or similar checks.
A comment in join_types claiming non-existent joins return ErrorType. Actually, it never does so (it seems to just fallback to Union.make_simplified_union.
An assignment to self.err in TypeFixture's constructor. This is solely used in the tests to make sure joins handle ErrorType correctly...even though it's never actually used outside of that.
So it seems pretty much impossible for an ErrorType to wander into...anywhere, really. Have its uses just declined over time?
The text was updated successfully, but these errors were encountered:
...or at least I think so?
Anyway, I was working on a fix for #2998, and I just happened to stumble upon
ErrorType
. It seemed like the perfect potential solution: make an uninferred variable of typeErrorType
, that way you won't get future errors deriving from it. Just to see, though I ranucg ErrorType
over mypy's codebase. Only instances I found were:types.py
.if isinstance(xyz, ErrorType): return ErrorType()
or similar checks.join_types
claiming non-existent joins returnErrorType
. Actually, it never does so (it seems to just fallback toUnion.make_simplified_union
.self.err
inTypeFixture
's constructor. This is solely used in the tests to make sure joins handleErrorType
correctly...even though it's never actually used outside of that.So it seems pretty much impossible for an
ErrorType
to wander into...anywhere, really. Have its uses just declined over time?The text was updated successfully, but these errors were encountered: