Skip to content

Commit

Permalink
dynamically check game type (facebookresearch#2205)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebookresearch#2205

## What

- Don't hardcode the game type strings in PC-CLI

## Why

- Because it's annoying

Reviewed By: joe1234wu, xyguo

Differential Revision: D44176952

fbshipit-source-id: e139bd21758b417cabcc0ab0e86895e663cbfa5a
  • Loading branch information
jrodal98 authored and facebook-github-bot committed Mar 20, 2023
1 parent 679b5c5 commit 017348e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fbpcs/private_computation_cli/private_computation_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,7 @@ def main(argv: Optional[List[str]] = None) -> None:
None,
schema.And(
schema.Use(str.upper),
# TODO(T148164182): try replacing this with "lambda s: any(s == g.value for g in PrivateComputationGameType)"
lambda s: s
in ("LIFT", "ATTRIBUTION", "PRIVATE_ID_DFCA", "ANONYMIZER"),
lambda s: s in (g.value for g in PrivateComputationGameType),
schema.Use(PrivateComputationGameType),
),
),
Expand Down

0 comments on commit 017348e

Please sign in to comment.