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
Unfortunately, mypy doesn't print the location of the config file it uses, or the locations where it tries to find a config file, so no more details on the problem is available.
Expected Behavior
As stated in the documentation: https://mypy.readthedocs.io/en/stable/config_file.html ~/.mypy.ini should be used if --config-file is not specified and other preferred config file locations do not exist, which it true in my case.
So I would expect the exact same behavior if --config-file ~/.mypy.ini is specified and if --config-file is not specified at all.
Yes, user-level config file discovery was broken in 1.15.0, fixed in #18656 approx. a week after release. I confirmed that global config doesn't work in 1.15.0 and works on current master.
Bug Report
I have my
mypy
configuration file at~/.mypy.ini
.In that config file I have the following option:
However when I run
mypy
from some working directory,.mypy_cache
directory gets created in that directory, which means my config file is not used.However, if I specify path to that config file directly, it's used correctly:
$ mypy -v --config-file ~/.mypy.ini SomeFile.py LOG: Mypy Version: 1.15.0 LOG: Config File: /home/user/.mypy.ini LOG: Configured Executable: /usr/bin/python3 LOG: Current Executable: /usr/bin/python3 LOG: Cache Dir: /tmp/mypy_cache ...
Unfortunately,
mypy
doesn't print the location of the config file it uses, or the locations where it tries to find a config file, so no more details on the problem is available.Expected Behavior
As stated in the documentation: https://mypy.readthedocs.io/en/stable/config_file.html
~/.mypy.ini
should be used if--config-file
is not specified and other preferred config file locations do not exist, which it true in my case.So I would expect the exact same behavior if
--config-file ~/.mypy.ini
is specified and if--config-file
is not specified at all.Actual Behavior
Note
Config File: Default
andCache Dir: .mypy_cache
.And indeed,
./.mypy_cache
folder is created.Your Environment
The text was updated successfully, but these errors were encountered: