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

Add annotations to opensource/fbcode_builder

Reviewed By: shannonzhu

Differential Revision: D34357770

fbshipit-source-id: fde97212d0e0cbd203e094486f3620205d861faa
This commit is contained in:
Pyre Bot Jr
2022-02-18 20:04:07 -08:00
committed by Facebook GitHub Bot
parent 6f5c74656b
commit 6933945fd5
2 changed files with 5 additions and 5 deletions

View File

@@ -64,7 +64,7 @@ class BuilderBase(object):
env=None, env=None,
use_cmd_prefix: bool = True, use_cmd_prefix: bool = True,
allow_fail: bool = False, allow_fail: bool = False,
): ) -> int:
if env: if env:
e = self.env.copy() e = self.env.copy()
e.update(env) e.update(env)
@@ -86,19 +86,19 @@ class BuilderBase(object):
allow_fail=allow_fail, allow_fail=allow_fail,
) )
def _reconfigure(self, reconfigure) -> bool: def _reconfigure(self, reconfigure: bool) -> bool:
if self.build_dir is not None: if self.build_dir is not None:
if not os.path.isdir(self.build_dir): if not os.path.isdir(self.build_dir):
os.makedirs(self.build_dir) os.makedirs(self.build_dir)
reconfigure = True reconfigure = True
return reconfigure return reconfigure
def prepare(self, install_dirs, reconfigure) -> None: def prepare(self, install_dirs, reconfigure: bool) -> None:
print("Preparing %s..." % self.manifest.name) print("Preparing %s..." % self.manifest.name)
reconfigure = self._reconfigure(reconfigure) reconfigure = self._reconfigure(reconfigure)
self._prepare(install_dirs=install_dirs, reconfigure=reconfigure) self._prepare(install_dirs=install_dirs, reconfigure=reconfigure)
def build(self, install_dirs, reconfigure) -> None: def build(self, install_dirs, reconfigure: bool) -> None:
print("Building %s..." % self.manifest.name) print("Building %s..." % self.manifest.name)
reconfigure = self._reconfigure(reconfigure) reconfigure = self._reconfigure(reconfigure)
self._prepare(install_dirs=install_dirs, reconfigure=reconfigure) self._prepare(install_dirs=install_dirs, reconfigure=reconfigure)

View File

@@ -158,7 +158,7 @@ def tpx_path() -> str:
return "xplat/testinfra/tpx/ctp.tpx" return "xplat/testinfra/tpx/ctp.tpx"
def path_search(env, exename, defval=None): def path_search(env, exename: str, defval=None):
"""Search for exename in the PATH specified in env. """Search for exename in the PATH specified in env.
exename is eg: `ninja` and this function knows to append a .exe exename is eg: `ninja` and this function knows to append a .exe
to the end on windows. to the end on windows.