Skip to content

Commit

Permalink
(easy) Fix pyre error #56/#35/#11
Browse files Browse the repository at this point in the history
Summary: Fix pyre error #56/#35/#11 in Open/R python codebase.

Reviewed By: saifhhasan

Differential Revision: D28271698

fbshipit-source-id: b21e5743f15bbdbaa030e7e8c1beac7ecea6e369
  • Loading branch information
yi-xian authored and facebook-github-bot committed May 7, 2021
1 parent 978de9e commit 5e38c6e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions openr/py/openr/cli/clis/kvstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,14 +293,14 @@ def unset(cli_opts, node): # noqa: B902


class SummaryCli(object):
default_area_list: List[str] = []

@click.command()
# pyre-fixme[56]: Pyre was not able to infer the type of argument `[]` to
# decorator factory `click.option`.
@click.option(
"--area",
"-a",
multiple=True,
default=[],
default=default_area_list,
help="Dump summaries for the given list of areas. Default will dump "
"summaries for all areas. Multiple areas can be provided by repeatedly using "
"either of the two valid flags: -a or --areas",
Expand Down
5 changes: 2 additions & 3 deletions openr/py/openr/cli/commands/kvstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -1465,9 +1465,8 @@ def _get_global_summary(
) -> openr_types.KvStoreAreaSummary:
global_summary = openr_types.KvStoreAreaSummary()
global_summary.area = "ALL" + self._get_area_str()
# pyre-fixme[35]: Target cannot be annotated.
# pyre-fixme[11]: Annotation `peerSpec` is not defined as a type.
global_summary.peersMap: Dict[str, openr_types.peerSpec] = {}
# peersMap's type: Dict[str, openr_types.PeerSpec]
global_summary.peersMap = {}
# create a map of unique total peers for this node
for s in summaries:
for peer, peerSpec in s.peersMap.items():
Expand Down

0 comments on commit 5e38c6e

Please sign in to comment.