Closed
Description
Bug Report
I noticed that after upgrading to 0.990, mypy in djangorestframework-stubs CI no longer finds any errors.
It seems this happens when the source folder is passed as a full path, instead of relative path. $PWD
is the full path of the current working directory:
% mypy --config-file $PWD/mypy.ini --show-traceback --hide-error-context ./drf_source/tests |tail -n1
Found 569 errors in 48 files (checked 83 source files)
% mypy --config-file $PWD/mypy.ini --show-traceback --hide-error-context $PWD/drf_source/tests |tail -n1
Success: no issues found in 83 source files
Maybe, just maybe, this is related to #13768? EDIT: seems not to be, various --follow-imports=
options have no effect.
To Reproduce
- Check out https://github.com/intgr/djangorestframework-stubs branch
update-to-mypy-0.990
- Install dependencies from
requirements.txt
in a virtualenv - Upgrade to mypy 0.990
- Run
python scripts/typecheck_tests.py
, which populates thedrf_source
directory - Try running the commands above
Your Environment
- Mypy version used: 0.990
- Mypy configuration options from
mypy.ini
(and other config files): https://github.com/typeddjango/djangorestframework-stubs/blob/06a2f2f9f6c05a07f03bc1bd7f1b54ecfd7a3c43/mypy.ini - Python version used: 3.10.8