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

feat(mypy): Support mypy cache in nested modules #51

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions bin/pycheckers.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,11 +730,10 @@ def _get_cache_dir(self, project_root):
under a subdir corresponding to the branch name.
"""
branch_top = os.path.join(project_root, '.mypy_cache', 'branches')
# It doesn't make sense to get a branch name unless we actually found a
# VCS root (i.e. a virtualenv match isn't enough)
branch = '' # type: Optional[str]
if find_vcs_name(project_root):
branch = get_vcs_branch_name(project_root)
branch = '' # type: Optional[str]
vcs_root = find_vcs_root(project_root)[0]
if vcs_root:
branch = get_vcs_branch_name(vcs_root)
if branch:
cache_dir = os.path.join(branch_top, branch)
else:
Expand Down