Regarding `mypy` config, what’s the reason for hav...
# general
c
Regarding
mypy
config, what’s the reason for having both an
extra_requirements
option as well as
extra_type_stubs
?
h
requirements are intended for MyPy plugins. They go into mypy.pex type stubs go into the user's merged PEX, meanwhile, rather than the tool PEX It was necessary for a few reasons and took a few iterations. I can try to backtrace, but also I think the PRs should explain + comments in code How come?
c
trying to figure out why/what is correct, rather than this:
Copy code
extra_requirements = ["django-stubs==1.9.0", "types-requests==2.27"]
extra_type_stubs = ["django-stubs==1.9.0", "types-requests==2.27"]
source_plugins = ["src/python/..."]
lockfile = "3rdparty/python/lockfiles/mypy.txt"
as the duplication here feels… off.
and likely the result of trial and error until something works then don’t touch it 😛
h
having to put django-stubs in both is right. it's a weird one that it's both stubs and a plugin 😕
wrong to put types-requests in both
c
Ah, yea found the “awkward” explanation regarding django-stubs here: https://github.com/pantsbuild/pants/pull/12597 was a good PR trail, thanks for that.