mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
Add annotations to opensource/fbcode_builder
Reviewed By: shannonzhu Differential Revision: D34357770 fbshipit-source-id: fde97212d0e0cbd203e094486f3620205d861faa
This commit is contained in:
parent
e883187ed6
commit
9b0fa6eaf5
@ -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)
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user