[xplat][buck2][typing] Fix typechecker issue (#108525)

Test Plan: CI

Reviewed By: JakobDegen

Differential Revision: D48817210

Pull Request resolved: https://github.com/pytorch/pytorch/pull/108525
Approved by: https://github.com/osalpekar
This commit is contained in:
Stiopa Koltsov
2023-09-05 18:18:45 +00:00
committed by PyTorch MergeBot
parent 8da04e023e
commit 1e0e55c504

View File

@ -79,6 +79,11 @@ def pt_operator_library(
not_include_all_overloads_closure_ops = kwargs.pop("not_include_all_overloads_closure_ops", False) not_include_all_overloads_closure_ops = kwargs.pop("not_include_all_overloads_closure_ops", False)
if False:
# TODO(nga): `yaml_option` is never `None`, but it is checked against `None` below.
# Typechecker (`--unstable-typecheck`) catches it.
yaml_option = None
fb_xplat_genrule( fb_xplat_genrule(
name = name, name = name,
out = "model_operators.yaml", out = "model_operators.yaml",