Skip to content

Commit

Permalink
Support environment variable interpolation for junit_xml + quickstart…
Browse files Browse the repository at this point in the history
…_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`
  • Loading branch information
Mattwmaster58 authored Mar 6, 2020
1 parent 514dbfb commit d2e984a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mypy/config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def split_and_match_files(paths: str) -> List[str]:
'custom_typeshed_dir': expand_path,
'mypy_path': lambda s: [expand_path(p.strip()) for p in re.split('[,:]', s)],
'files': split_and_match_files,
'quickstart_file': str,
'junit_xml': str,
'quickstart_file': expand_path,
'junit_xml': expand_path,
# These two are for backwards compatibility
'silent_imports': bool,
'almost_silent': bool,
Expand Down

0 comments on commit d2e984a

Please sign in to comment.