-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MYPY_CONFIG_FILE_DIR to environment when config file is read (2nd…
… try) (#9414) (This fixes the mistake I introduced in the previous version.) Resubmit of #9403. Fixes #7968. Co-authored-by: aghast <aghast@aghast.dev>
- Loading branch information
1 parent
abd9c79
commit 9d03846
Showing
3 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ | |
cmdline_files = [ | ||
'cmdline.test', | ||
'reports.test', | ||
'envvars.test', | ||
] | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Test cases related to environment variables | ||
[case testEnvvar_MYPY_CONFIG_FILE_DIR] | ||
# cmd: mypy --config-file=subdir/mypy.ini | ||
[file bogus.py] | ||
FOO = 'x' # type: int | ||
[file subdir/good.py] | ||
BAR = 0 # type: int | ||
[file subdir/mypy.ini] | ||
\[mypy] | ||
files=$MYPY_CONFIG_FILE_DIR/good.py | ||
|