Skip to content

Commit bb7fd1f

Browse files
simpkinspytorchmergebot
authored andcommitted
[caffe2] fix type annotations for workspace.SwitchWorkspace() (pytorch#77464)
Summary: The `create_if_missing` parameter is optional, and defaults to `None`. Test Plan: Confirmed that Pyre no longer complains about calling `SwitchWorkspace` with a single string argument. Differential Revision: D36366987 Pull Request resolved: pytorch#77464 Approved by: https://github.com/voznesenskym
1 parent 53b3057 commit bb7fd1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

caffe2/python/_import_c_extension.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def on_module_exit() -> None: ...
179179
@overload
180180
def switch_workspace(ws: Workspace): ...
181181
@overload
182-
def switch_workspace(name: _PybindStr, create_if_missing: bool): ...
182+
def switch_workspace(name: _PybindStr, create_if_missing: Optional[bool] = None): ...
183183
def create_child_workspace(
184184
parent_ws_name: _PybindStr, child_ws_name: _PybindStr
185185
) -> None: ...

0 commit comments

Comments
 (0)