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 e883187ed6
commit 9b0fa6eaf5
2 changed files with 5 additions and 5 deletions

View File

@ -64,7 +64,7 @@ class BuilderBase(object):
env=None,
use_cmd_prefix: bool = True,
allow_fail: bool = False,
):
) -> int:
if env:
e = self.env.copy()
e.update(env)
@ -86,19 +86,19 @@ class BuilderBase(object):
allow_fail=allow_fail,
)
def _reconfigure(self, reconfigure) -> bool:
def _reconfigure(self, reconfigure: bool) -> 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) -> None:
def prepare(self, install_dirs, reconfigure: bool) -> None:
print("Preparing %s..." % self.manifest.name)
reconfigure = self._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)
reconfigure = self._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"
def path_search(env, exename, defval=None):
def path_search(env, exename: str, defval=None):
"""Search for exename in the PATH specified in env.
exename is eg: `ninja` and this function knows to append a .exe
to the end on windows.