1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-05 19:55:47 +03:00

Add annotations to opensource/fbcode_builder

Reviewed By: shannonzhu

Differential Revision: D34332682

fbshipit-source-id: 498c63851f98dd76502a20a9d1589df5b0c4e7b9
This commit is contained in:
Pyre Bot Jr
2022-02-17 22:54:34 -08:00
committed by Facebook GitHub Bot
parent a9b46b7cc6
commit 1f77084c8e
8 changed files with 15 additions and 15 deletions

View File

@@ -86,14 +86,14 @@ class BuilderBase(object):
allow_fail=allow_fail,
)
def _reconfigure(self, reconfigure):
def _reconfigure(self, reconfigure) -> bool:
if self.build_dir is not None:
if not os.path.isdir(self.build_dir):
os.makedirs(self.build_dir)
reconfigure = True
return reconfigure
def prepare(self, install_dirs, reconfigure):
def prepare(self, install_dirs, reconfigure) -> None:
print("Preparing %s..." % self.manifest.name)
reconfigure = self._reconfigure(reconfigure)
self._prepare(install_dirs=install_dirs, reconfigure=reconfigure)
@@ -143,7 +143,7 @@ class BuilderBase(object):
raise an exception."""
pass
def _prepare(self, install_dirs, reconfigure):
def _prepare(self, install_dirs, reconfigure) -> None:
"""Prepare the build. Useful when need to generate config,
but builder is not the primary build system.
e.g. cargo when called from cmake"""
@@ -690,7 +690,7 @@ if __name__ == "__main__":
return define_args
def _build(self, install_dirs, reconfigure) -> None:
def _build(self, install_dirs, reconfigure: bool) -> None:
reconfigure = reconfigure or self._needs_reconfigure()
env = self._compute_env(install_dirs)