https://pantsbuild.org/ logo
#development
Title
# development
h

happy-kitchen-89482

08/11/2022, 2:20 PM
Do we have a known mypy error in main?
Copy code
$ ./pants check src/python/pants/engine/target.py
10:19:55.91 [ERROR] Completed: Typecheck using MyPy - mypy failed (exit code 1).
src/python/pants/engine/target.py:43: note: In module imported here:
src/python/pants/engine/collection.py: note: In class "Collection":
src/python/pants/engine/collection.py:55:16: error: Incompatible types in
assignment (expression has type "Callable[[], int]", base class "object" defined
the type as "Callable[[object], int]")  [assignment]
        __hash__ = Tuple.__hash__
                   ^
src/python/pants/engine/target.py: note: In class "CoarsenedTargets":
src/python/pants/engine/target.py:893:16: error: Incompatible types in
assignment (expression has type "Callable[[], int]", base class "object" defined
the type as "Callable[[object], int]")  [assignment]
        __hash__ = Tuple.__hash__
                   ^
Found 2 errors in 2 files (checked 1 source file)



✕ mypy failed.
I get this even if I run on all of
src/python/pants::
So it’s not an artifact of running on a subset of files or whatever
CIs seem to be passing
h

hundreds-father-404

08/11/2022, 2:31 PM
I wonder if it's from running MyPy with a different Python version perhaps?
h

happy-kitchen-89482

08/11/2022, 2:42 PM
Ah could be
I’m on 3.9
Apple ARM and all that
Grr
Well at least it won’t break CI
h

hundreds-father-404

08/11/2022, 2:52 PM
that's what i use. I ran
./pants check src/python/pants/engine/target.py
on main and it passed
h

happy-kitchen-89482

08/11/2022, 4:30 PM
huh…
And that does fail for me locally as well
but my change didn’t touch that file
Although it doesn’t fail for me on main locally
Oh, NM I am a dummy
👀 1
That was a real error