mtshiba / pylyzer

A fast, feature-rich static code analyzer & language server for Python
http://mtshiba.github.io/pylyzer/
MIT License
2.48k stars 33 forks source link

`exec_casting` test fail on x86_64-darwin #114

Open GaetanLepage opened 1 week ago

GaetanLepage commented 1 week ago

Describe the bug The exec_casting test fail only on x86_64-darwin since the latest stable version (0.0.70).

failures:

---- exec_casting stdout ----
Testing tests/casting.py ...
errors: Error[#4335]: File tests/casting.py, line 5, <module>

5 | assert isinstance(s, int)  # ERR
  :                   -

s: {"a"} cannot be cast to Int

Error[#1450]: File tests/casting.py, line 14, <module>

14 | d = typing.cast(dict[str, int], [1, 2, 3])
   : -
   : `- Type Dict({Str..Obj: Int}) is a subtype of Indexable({"a"}..Obj, Int) but not of Iterable(Str..Obj..Obj)

Dict({Str..Obj: Int}) does not implement Iterable(Str..Obj..Obj) and Indexable({"a"}..Obj, Int)

Error: "Expected 1 errors, found 2"

failures:
    exec_casting

test result: FAILED. 20 passed; 1 failed; 0 ignored; 0 measured; 1 filtered out; finished in 0.13s

Reproducible Code

$ cargo test

Expected behavior The tests succeed

Screenshots If applicable, add screenshots to help explain your problem.

Environment

Additional context

Updating pylyzer to 0.0.70 in nixpkgs. https://github.com/NixOS/nixpkgs/pull/354954

GaetanLepage commented 1 week ago

Note: I am executing the test from the Rosetta layer on an aarch64-darwin machine.