Skip to content

Commit 3165c2e

Browse files
Fabian Schenkmeta-codesync[bot]
authored andcommitted
Fix return type to match annotation
Summary: Before: It would return `bool | None` while being annotated as `bool` After: It returns always `bool` ___ Differential Revision: D110324290 fbshipit-source-id: 432a603146c5a78121c9f8b95b15e9bed9098abc
1 parent 6f4f39a commit 3165c2e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

iopath/common/file_io.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1679,10 +1679,10 @@ def _copy_across_handlers(
16791679
assert dst_handler._copy_from_local is not None
16801680

16811681
local_file = src_handler._get_local_path(src_path, **kwargs)
1682-
# pyre-fixme[7]: Expected `bool` but got `None`.
1683-
return dst_handler._copy_from_local(
1682+
result = dst_handler._copy_from_local(
16841683
local_file, dst_path, overwrite=overwrite, **kwargs
16851684
)
1685+
return result if result is not None else False
16861686

16871687

16881688
"""

0 commit comments

Comments
 (0)