From a51a30082768c566a579c661aaa7229082f6ff49 Mon Sep 17 00:00:00 2001 From: Pyre Bot Jr <> Date: Tue, 3 May 2022 20:29:21 -0700 Subject: [PATCH] suppress errors in `fbcode/vision` - batch 2 Differential Revision: D36120486 fbshipit-source-id: bddbf47957f4476f826ad20c2d6e146c98ee73e1 --- pytorch3d/implicitron/tools/video_writer.py | 4 ++++ pytorch3d/io/obj_io.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/pytorch3d/implicitron/tools/video_writer.py b/pytorch3d/implicitron/tools/video_writer.py index 364dabee..7d5edd44 100644 --- a/pytorch3d/implicitron/tools/video_writer.py +++ b/pytorch3d/implicitron/tools/video_writer.py @@ -84,6 +84,8 @@ class VideoWriter: or a 2-tuple defining the size of the output image. """ + # pyre-fixme[6]: For 1st param expected `Union[PathLike[str], str]` but got + # `Optional[str]`. outfile = os.path.join(self.cache_dir, self.regexp % self.frame_num) if isinstance(frame, matplotlib.figure.Figure): @@ -125,6 +127,8 @@ class VideoWriter: video_path: The path to the generated video. """ + # pyre-fixme[6]: For 1st param expected `Union[PathLike[str], str]` but got + # `Optional[str]`. regexp = os.path.join(self.cache_dir, self.regexp) if self.output_format == "visdom": # works for ppt too diff --git a/pytorch3d/io/obj_io.py b/pytorch3d/io/obj_io.py index ca6faf41..09bb5346 100644 --- a/pytorch3d/io/obj_io.py +++ b/pytorch3d/io/obj_io.py @@ -216,6 +216,8 @@ def load_obj( """ data_dir = "./" if isinstance(f, (str, bytes, Path)): + # pyre-fixme[6]: For 1st param expected `PathLike[Variable[AnyStr <: [str, + # bytes]]]` but got `Union[Path, bytes, str]`. data_dir = os.path.dirname(f) if path_manager is None: path_manager = PathManager()