Skip to content

Y041 is not compatible with mypy 0.990 #299

@kasium

Description

@kasium

With mypy 0.990 type promotions was changed.

Before

class Foo:
  a: complex

isinstance(Foo().a, int)  # fine

After

class Foo:
  a: complex

isinstance(Foo().a, int)  # fails

class Foo:
  a: complex | float | int  # raises Y041 

isinstance(Foo().a, int)  # fine

Not sure what to do with this check, but just raining attention.
See python/mypy#14030 and python/typeshed#9130

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions