Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support expansion of all path configuration options #7273

Merged
merged 2 commits into from Jul 30, 2019

Conversation

@hetmankp
Copy link
Contributor

commented Jul 29, 2019

This closes #7272; all options in the configuration file that deal with paths will be expanded for the user home directory and environment variables.

This commit modifies parsing of all configuration options dealing with
paths so that they may be able to expand user home directories and
environment variables as per the 'cache_dir' configuration.
@hetmankp hetmankp force-pushed the hetmankp:topic/config-expand-vars branch from c6d6be4 to f376e57 Jul 29, 2019
@msullivan msullivan self-requested a review Jul 29, 2019
@@ -63,8 +64,9 @@ def split_and_match_files(paths: str) -> List[str]:
'python_version': parse_version,
'strict_optional_whitelist': lambda s: s.split(),
'custom_typing_module': str,
'custom_typeshed_dir': str,
'mypy_path': lambda s: [p.strip() for p in re.split('[,:]', s)],
'custom_typeshed_dir': lambda s: os.path.expandvars(os.path.expanduser(s)),

This comment has been minimized.

Copy link
@msullivan

msullivan Jul 29, 2019

Collaborator

How about defining a function that does the two expansions together?

Copy link
Collaborator

left a comment

Looks good in general. One code organization request.

@hetmankp

This comment has been minimized.

Copy link
Contributor Author

commented Jul 30, 2019

Ok, let me know if that's what you had in mind.

@msullivan msullivan merged commit d044c2e into python:master Jul 30, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@msullivan

This comment has been minimized.

Copy link
Collaborator

commented Jul 30, 2019

Yeah!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.