gentle-flower-25372
03/28/2024, 5:26 AMerror: Duplicate module named 'test'
I've attempted to use the mypy ignore option without success.
I realize that moving around the test sub-dir to something unique per module would fix this or moving tests next to the source, but both of those options aren't ideal when talking about adopting pants into over 100 modules.
This is the culprit: https://github.com/pantsbuild/pants/blob/1d1e93edcdf617c651c3eb1d1cbadd29d99172b2/src/python/pants/backend/python/typecheck/mypy/rules.py#L338gentle-flower-25372
03/28/2024, 5:41 AMpants --changed-since=origin/main list | grep pyproject.toml:poetry | sed 's|/pyproject.toml:poetry|::|g' | xargs pants check
gentle-flower-25372
03/28/2024, 6:03 AMset -e
for dir in $(pants --changed-since=origin/main list | egrep "pyproject.toml:poetry$" | sed 's|/pyproject.toml:poetry||g'); do
pushd $dir
mypy --config-file $(git rev-parse --show-toplevel)/mypy.ini .
popd
done
dazzling-plastic-2448
03/28/2024, 7:37 PMbroad-processor-92400
03/31/2024, 12:49 AM