Skip to content

Commit 96e4d45

Browse files
committed
move subdir generation outside of loop
1 parent 4474e8a commit 96e4d45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypy/build.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ def default_lib_path(data_dir: str, pyversion: Tuple[int, int]) -> List[str]:
275275
# The idea is to implement the example in PEP 484, where the annotations
276276
# are installed under shared/typehints/python.
277277
# TODO it would be nicer to find typehints directly via pkg_resources
278+
pkgsubdir = os.path.join('shared', 'typehints', 'python' + v)
278279
for pkginstalldir in get_pkg_locations():
279-
subdir = os.path.join('shared', 'typehints', 'python' + v)
280-
pkgstubdir = os.path.join(pkginstalldir, subdir)
280+
pkgstubdir = os.path.join(pkginstalldir, pkgsubdir)
281281
if os.path.isdir(pkgstubdir):
282282
path.append(pkgstubdir)
283283

0 commit comments

Comments
 (0)