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: D34224272 fbshipit-source-id: 52e19886ab3d4fb015a557244660dd4357a35c17
This commit is contained in:

committed by
Facebook GitHub Bot
parent
6c86c07528
commit
e77a9fe43a
@@ -45,7 +45,7 @@ def find_eden_root(dirpath):
|
||||
return None
|
||||
|
||||
|
||||
def prefetch_dir_if_eden(dirpath):
|
||||
def prefetch_dir_if_eden(dirpath) -> None:
|
||||
"""After an amend/rebase, Eden may need to fetch a large number
|
||||
of trees from the servers. The simplistic single threaded walk
|
||||
performed by copytree makes this more expensive than is desirable
|
||||
@@ -65,7 +65,8 @@ def prefetch_dir_if_eden(dirpath):
|
||||
PREFETCHED_DIRS.add(dirpath)
|
||||
|
||||
|
||||
def copytree(src_dir, dest_dir, ignore=None):
|
||||
# pyre-fixme[9]: ignore has type `bool`; used as `None`.
|
||||
def copytree(src_dir, dest_dir, ignore: bool = None):
|
||||
"""Recursively copy the src_dir to the dest_dir, filtering
|
||||
out entries using the ignore lambda. The behavior of the
|
||||
ignore lambda must match that described by `shutil.copytree`.
|
||||
@@ -75,4 +76,7 @@ def copytree(src_dir, dest_dir, ignore=None):
|
||||
uses watchman to mirror src_dir into dest_dir.
|
||||
"""
|
||||
prefetch_dir_if_eden(src_dir)
|
||||
# pyre-fixme[6]: For 3rd param expected
|
||||
# `Union[typing.Callable[[Union[PathLike[str], str], List[str]], Iterable[str]],
|
||||
# typing.Callable[[str, List[str]], Iterable[str]], None]` but got `bool`.
|
||||
return shutil.copytree(src_dir, dest_dir, ignore=ignore)
|
||||
|
Reference in New Issue
Block a user