You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixespython#12664
See python#18907 which is another possible fix
I'm not sure why this logic is actually needed given that we should
record the dependency from import analysis in fastparse... maybe just
because it adjusts priority?
I can't write a good test for this because it requires something in site_packages, but here's a minimal repro:
```
set -eux
rm -rf repro
mkdir repro
cd repro
SITEPACK=env/site-packages
mkdir -p $SITEPACK
mkdir $SITEPACK/ruamel
mkdir $SITEPACK/ruamel/yaml
printf 'from ruamel.yaml.main import *' > $SITEPACK/ruamel/yaml/__init__.py
printf 'import ruamel.yaml' > $SITEPACK/ruamel/yaml/main.py
printf '' > $SITEPACK/ruamel/yaml/py.typed
printf 'import ruamel.yaml' > a.py
printf 'import a' > main.py
rm -rf .mypy_cache
PYTHONPATH=$SITEPACK mypy main.py
PYTHONPATH=$SITEPACK mypy main.py
```
0 commit comments