ruff/crates/ty_python_semantic/resources/mdtest/expression/assert.md
2025-05-03 19:49:15 +02:00

236 B

Condition with object that implements __bool__ incorrectly

class NotBoolable:
    __bool__: int = 3

# error: [unsupported-bool-conversion] "Boolean conversion is unsupported for type `NotBoolable`"
assert NotBoolable()