Skip to content

Commit 1966934

Browse files
committed
Fix linter complaints and add type annotations
1 parent 9b2c765 commit 1966934

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/pip/_internal/req/req_install.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,9 +1006,17 @@ def prepend_root(path):
10061006
f.write('\n'.join(new_lines) + '\n')
10071007

10081008
def install_use_pep517(
1009-
self, warn_script_location, use_user_site, pycompile, prefix, root, home
1009+
self,
1010+
warn_script_location, # type: bool
1011+
use_user_site, # type: bool
1012+
pycompile, # type: bool
1013+
prefix, # type: Optional[str]
1014+
root, # type: Optional[str]
1015+
home # type: Optional[str]
10101016
):
1011-
with TempDirectory(kind='wheel') as wheel_dir, TempDirectory(kind='wheel') as build_dir:
1017+
# type: (...) -> None
1018+
with TempDirectory(kind='wheel') as wheel_dir, \
1019+
TempDirectory(kind='wheel') as build_dir:
10121020
wheel_name = self.build_wheel_use_pep517(build_dir.path)
10131021
unpack_file(
10141022
os.path.join(build_dir.path, wheel_name),
@@ -1023,9 +1031,9 @@ def install_use_pep517(
10231031
warn_script_location=warn_script_location,
10241032
use_user_site=use_user_site, pycompile=pycompile,
10251033
)
1026-
return
10271034

10281035
def build_wheel_use_pep517(self, output_directory):
1036+
# type: (str) -> str
10291037
self.spin_message = 'Building wheel for %s (PEP 517)' % (self.name,)
10301038
with self.build_env, indent_log():
10311039
return self.pep517_backend.build_wheel(

0 commit comments

Comments
 (0)