Skip to content

Mypy 2.4 infers DigitalWaveform[np.bool[Any]] instead of DigitalWaveform[np.bool[builtins.bool]] #296

Open

Description

@bkeryan

Bug Report

Mypy 2.4.0 introduced these failures, which I am ignoring for now:

tests\unit\waveform\test_digital_waveform.py:65: error: Expression is of type "DigitalWaveform[numpy.bool[Any]]", not "DigitalWaveform[numpy.bool[builtins.bool]]"  [assert-type]
tests\unit\waveform\test_digital_waveform.py:173: error: Expression is of type "DigitalWaveform[numpy.bool[Any]]", not "DigitalWaveform[numpy.bool[builtins.bool]]"  [assert-type]

Pyright still infers DigitalWaveform[np.bool[builtins.bool]].

Repro or Code Sample

Remove type: ignore from the lines referenced above.

Expected Behavior

assert_type with DigitalWaveform[np.bool] "just works".

Current Behavior

See above

AB#4147586

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions