-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
...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 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 returnErrorType
. Actually, it never does so (it seems to just fallback toUnion.make_simplified_union
. - An assignment to
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?
elazarg
Metadata
Metadata
Assignees
Labels
No labels