KEMBAR78
Expand user home directory for cache_dir by m-zat · Pull Request #10051 · python/mypy · GitHub
Skip to content

Conversation

@m-zat
Copy link
Contributor

@m-zat m-zat commented Feb 8, 2021

Description

Currently cache_dir does not expand user home directory, which results
in counter-intuitive behavior when setting for instance

MYPY_CACHE_DIR='~/.cache/mypy/'

In this case a folder named ~ is created in the cwd where mypy is
launched.

This commit modifies the behavior and expands the ~ into the user home
directory.

Test Plan

Tested by setting MYPY_CACHE_DIR=~/.cache/mypy and checked that the folder is picked correctly.

Currently cache_dir does not expand user home directory, which results
in counter-intuitive behavior when setting for instance

MYPY_CACHE_DIR='~/.cache/mypy/'

In this case a folder named ~ is created in the cwd where mypy is
launched.

This commit modifies the behavior and expands the ~ into the user home
directory.
Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, the new behavior seems more user friendly (and less surprising).

@JukkaL JukkaL merged commit f160384 into python:master Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants