File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -298,3 +298,18 @@ $ echo "from pkg import X" > $TMPDIR/foo.py && \
298298ERROR * Found stubs for `pkg`, but no source* (glob)
299299[1]
300300```
301+
302+ ## Regression test: we should still be able to find submodules when stubs are missing
303+
304+ ``` scrut {output_stream.stdout}
305+ $ mkdir $TMPDIR/site_package_missing_stubs && \
306+ > mkdir $TMPDIR/site_package_missing_stubs/django && \
307+ > touch $TMPDIR/site_package_missing_stubs/django/__init__.py && \
308+ > mkdir $TMPDIR/site_package_missing_stubs/django/forms && \
309+ > touch $TMPDIR/site_package_missing_stubs/django/forms/__init__.py && \
310+ > echo "from django import forms; from typing import reveal_type; reveal_type(forms)" > $TMPDIR/foo.py && \
311+ > $PYREFLY check $TMPDIR/foo.py --error untyped-import --site-package-path $TMPDIR/site_package_missing_stubs --output-format=min-text
312+ ERROR * Missing type stubs for `django` * (glob)
313+ INFO * revealed type: Module[django.forms] * (glob)
314+ [1]
315+ ```
You can’t perform that action at this time.
0 commit comments