Skip to content

Commit

Permalink
Fix linter complaints and add type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
seppeljordan committed Jun 14, 2019
1 parent 9b2c765 commit 1966934
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/pip/_internal/req/req_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -1006,9 +1006,17 @@ def prepend_root(path):
f.write('\n'.join(new_lines) + '\n')

def install_use_pep517(
self, warn_script_location, use_user_site, pycompile, prefix, root, home
self,
warn_script_location, # type: bool
use_user_site, # type: bool
pycompile, # type: bool
prefix, # type: Optional[str]
root, # type: Optional[str]
home # type: Optional[str]
):
with TempDirectory(kind='wheel') as wheel_dir, TempDirectory(kind='wheel') as build_dir:
# type: (...) -> None
with TempDirectory(kind='wheel') as wheel_dir, \
TempDirectory(kind='wheel') as build_dir:
wheel_name = self.build_wheel_use_pep517(build_dir.path)
unpack_file(
os.path.join(build_dir.path, wheel_name),
Expand All @@ -1023,9 +1031,9 @@ def install_use_pep517(
warn_script_location=warn_script_location,
use_user_site=use_user_site, pycompile=pycompile,
)
return

def build_wheel_use_pep517(self, output_directory):
# type: (str) -> str
self.spin_message = 'Building wheel for %s (PEP 517)' % (self.name,)
with self.build_env, indent_log():
return self.pep517_backend.build_wheel(
Expand Down

0 comments on commit 1966934

Please sign in to comment.