Skip to content

Commit d2e984a

Browse files
Support environment variable interpolation for junit_xml + quickstart_file config keys (#8479)
Expands on the goal of #7273 Exactly what the title says. The docs say this: > Some flags support user home directory and environment variable expansion. To refer to the user home directory, use ~ at the beginning of the path. To expand environment variables use $VARNAME or ${VARNAME}. This would add `quickstart_file` and `junit_xml` to the flags that support environment variable expansion. The only downside I see here is if someone decides they want their JUnit XML ouput file or quickstart file something weird like `$file`
1 parent 514dbfb commit d2e984a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypy/config_parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ def split_and_match_files(paths: str) -> List[str]:
7474
'custom_typeshed_dir': expand_path,
7575
'mypy_path': lambda s: [expand_path(p.strip()) for p in re.split('[,:]', s)],
7676
'files': split_and_match_files,
77-
'quickstart_file': str,
78-
'junit_xml': str,
77+
'quickstart_file': expand_path,
78+
'junit_xml': expand_path,
7979
# These two are for backwards compatibility
8080
'silent_imports': bool,
8181
'almost_silent': bool,

0 commit comments

Comments
 (0)