Update mypy 0.740 -> 0.750

Release notes:
https://mypy-lang.blogspot.com/2019/11/mypy-0.html
This commit is contained in:
Ran Benita
2019-12-02 18:01:08 +02:00
parent da091b832d
commit 16ff9f591e
6 changed files with 12 additions and 12 deletions
+2 -3
View File
@@ -1074,14 +1074,13 @@ def try_makedirs(cache_dir) -> bool:
def get_cache_dir(file_path: Path) -> Path:
"""Returns the cache directory to write .pyc files for the given .py file path"""
# Type ignored until added in next mypy release.
if sys.version_info >= (3, 8) and sys.pycache_prefix: # type: ignore
if sys.version_info >= (3, 8) and sys.pycache_prefix:
# given:
# prefix = '/tmp/pycs'
# path = '/home/user/proj/test_app.py'
# we want:
# '/tmp/pycs/home/user/proj'
return Path(sys.pycache_prefix) / Path(*file_path.parts[1:-1]) # type: ignore
return Path(sys.pycache_prefix) / Path(*file_path.parts[1:-1])
else:
# classic pycache directory
return file_path.parent / "__pycache__"