mypy erroneously reports no [mypy] section in config file unless --config-file is specified

Bug #1841426 reported by Simon Lambourn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mypy (Ubuntu)
New
Undecided
Unassigned

Bug Description

Using mypy 0.670 installed via pip.
I created a file~/.config/mypy/config/mypy.ini containing a [mypy] section and one setting (mypy_path).

If I use python3 -m mypy [module to check]
I get an error:

[~]/.config/mypy/config: No [mypy] section in config file

Whereas if I use python3 -m mypy [module to check] --config-file ~/.config/mypy/config/mypy.ini
there is no error message and the config file is processed.

Expected behaviour:
No error message if the file contains a [mypy] section

ProblemType: Bug
DistroRelease: Ubuntu 19.04
Package: mypy (not installed)
ProcVersionSignature: Ubuntu 5.0.0-25.26-generic 5.0.18
Uname: Linux 5.0.0-25-generic x86_64
ApportVersion: 2.20.10-0ubuntu27.1
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Mon Aug 26 12:07:42 2019
SourcePackage: mypy
UpgradeStatus: Upgraded to disco on 2019-04-25 (123 days ago)

Revision history for this message
Simon Lambourn (simon-lambourn-o) wrote :
Revision history for this message
Michael R. Crusoe (misterc) wrote :

I can confirm that this behavior still exists in mypy 0.781

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.