Skip to content

Reverse operator on BoolElement return incorrect result #13

@abelcheung

Description

@abelcheung

Due to current implementation in annotation, BoolElement inherits from int instead of bool (actually bool is @final and not subclassable). This causes inconsistency like:

reveal_type(bool | BoolElement) -> int
reveal_type(bool ** BoolElement) -> Any

The only fix is to explicitly list all dunders for all subclasses of ObjectifiedDataElement, so they are no more subclass of builtin types, and therefore overridable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions