From 537275b730d7a6417fce68c3645f69c834bddca3 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005287564 Date: Tue, 22 Oct 2024 20:56:58 -0700 Subject: [PATCH] Clean up errors and remove unused ignores] [batch:134/562] [shard:2/N] Reviewed By: MaggieMoss Differential Revision: D64684764 fbshipit-source-id: 38998fde328826e2dcc951552b98a310a3e4e816 --- annotation_gui_gcp/lib/GUI.py | 4 ++++ annotation_gui_gcp/lib/views/cad_view.py | 6 ++++++ annotation_gui_gcp/lib/views/cp_finder_view.py | 3 +++ annotation_gui_gcp/lib/views/image_view.py | 2 ++ annotation_gui_gcp/lib/views/tools_view.py | 2 ++ 5 files changed, 17 insertions(+) diff --git a/annotation_gui_gcp/lib/GUI.py b/annotation_gui_gcp/lib/GUI.py index 44a999ec3..9f5ee59b4 100644 --- a/annotation_gui_gcp/lib/GUI.py +++ b/annotation_gui_gcp/lib/GUI.py @@ -7,9 +7,13 @@ from collections import defaultdict import flask +# pyre-fixme[21]: Could not find module `annotation_gui_gcp.lib.views.cad_view`. from annotation_gui_gcp.lib.views.cad_view import CADView +# pyre-fixme[21]: Could not find module `annotation_gui_gcp.lib.views.cp_finder_view`. from annotation_gui_gcp.lib.views.cp_finder_view import ControlPointFinderView +# pyre-fixme[21]: Could not find module `annotation_gui_gcp.lib.views.image_view`. from annotation_gui_gcp.lib.views.image_view import ImageView +# pyre-fixme[21]: Could not find module `annotation_gui_gcp.lib.views.tools_view`. from annotation_gui_gcp.lib.views.tools_view import ToolsView from opensfm import dataset diff --git a/annotation_gui_gcp/lib/views/cad_view.py b/annotation_gui_gcp/lib/views/cad_view.py index 29d1320d3..5671ab41e 100644 --- a/annotation_gui_gcp/lib/views/cad_view.py +++ b/annotation_gui_gcp/lib/views/cad_view.py @@ -5,6 +5,7 @@ from typing import Any, Dict, Tuple import rasterio +# pyre-fixme[21]: Could not find module `annotation_gui_gcp.lib.views.web_view`. from annotation_gui_gcp.lib.views.web_view import WebView, distinct_colors from flask import send_file from PIL import ImageColor @@ -23,6 +24,7 @@ def _load_georeference_metadata(path_cad_model) -> Dict[str, Any]: return metadata +# pyre-fixme[11]: Annotation `WebView` is not defined as a type. class CADView(WebView): def __init__( self, @@ -32,6 +34,7 @@ def __init__( path_cad_file, is_geo_reference=False, )-> None: + # pyre-fixme[19]: Expected 0 positional arguments. super().__init__(main_ui, web_app, route_prefix) self.main_ui = main_ui @@ -42,6 +45,7 @@ def __init__( self.load_georeference_metadata(path_cad_file) self.is_geo_reference = is_geo_reference + # pyre-fixme[16]: `CADView` has no attribute `app`. self.app.add_url_rule( f"{route_prefix}/model", f"{route_prefix}_model", @@ -100,6 +104,7 @@ def display_points(self) -> None: def refocus(self, lat, lon)->None: x, y, z = self.latlon_to_xyz(lat, lon) + # pyre-fixme[16]: `CADView` has no attribute `send_sse_message`. self.send_sse_message( {"x": x, "y": y, "z": z}, event_type="move_camera", @@ -166,4 +171,5 @@ def sync_to_client(self)->None: point_id ] + # pyre-fixme[16]: `CADView` has no attribute `send_sse_message`. self.send_sse_message(data) diff --git a/annotation_gui_gcp/lib/views/cp_finder_view.py b/annotation_gui_gcp/lib/views/cp_finder_view.py index b8b491402..23cd529e9 100644 --- a/annotation_gui_gcp/lib/views/cp_finder_view.py +++ b/annotation_gui_gcp/lib/views/cp_finder_view.py @@ -1,9 +1,11 @@ # pyre-unsafe import typing as t +# pyre-fixme[21]: Could not find module `annotation_gui_gcp.lib.views.image_view`. from annotation_gui_gcp.lib.views.image_view import ImageView +# pyre-fixme[11]: Annotation `ImageView` is not defined as a type. class ControlPointFinderView(ImageView): def __init__( self, @@ -18,6 +20,7 @@ def template_name(self): def get_candidate_images(self) -> t.List[str]: images_in_existing_views = [] + # pyre-fixme[16]: `ControlPointFinderView` has no attribute `main_ui`. for v in self.main_ui.sequence_views: images_in_existing_views.extend(v.image_list) diff --git a/annotation_gui_gcp/lib/views/image_view.py b/annotation_gui_gcp/lib/views/image_view.py index efc1a1bdf..8e6d9d1c6 100644 --- a/annotation_gui_gcp/lib/views/image_view.py +++ b/annotation_gui_gcp/lib/views/image_view.py @@ -1,6 +1,7 @@ # pyre-unsafe from typing import Dict, Any +# pyre-fixme[21]: Could not find module `annotation_gui_gcp.lib.views.web_view`. from annotation_gui_gcp.lib.views.web_view import WebView, distinct_colors @@ -9,6 +10,7 @@ def point_color(point_id: str) -> str: return hex_color +# pyre-fixme[11]: Annotation `WebView` is not defined as a type. class ImageView(WebView): def __init__( self, diff --git a/annotation_gui_gcp/lib/views/tools_view.py b/annotation_gui_gcp/lib/views/tools_view.py index 22a5e9bca..c3048a391 100644 --- a/annotation_gui_gcp/lib/views/tools_view.py +++ b/annotation_gui_gcp/lib/views/tools_view.py @@ -1,9 +1,11 @@ # pyre-unsafe from typing import Dict, Any +# pyre-fixme[21]: Could not find module `annotation_gui_gcp.lib.views.web_view`. from annotation_gui_gcp.lib.views.web_view import WebView +# pyre-fixme[11]: Annotation `WebView` is not defined as a type. class ToolsView(WebView): def __init__(self, main_ui, web_app): super().__init__(main_ui, web_app, "/tools")