Skip to content

Commit

Permalink
Clean up errors and remove unused ignores] [batch:134/562] [shard:2/N]
Browse files Browse the repository at this point in the history
Reviewed By: MaggieMoss

Differential Revision: D64684764

fbshipit-source-id: 38998fde328826e2dcc951552b98a310a3e4e816
  • Loading branch information
generatedunixname89002005287564 authored and facebook-github-bot committed Oct 23, 2024
1 parent c8eb66b commit 537275b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions annotation_gui_gcp/lib/GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions annotation_gui_gcp/lib/views/cad_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand All @@ -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
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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)
3 changes: 3 additions & 0 deletions annotation_gui_gcp/lib/views/cp_finder_view.py
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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)

Expand Down
2 changes: 2 additions & 0 deletions annotation_gui_gcp/lib/views/image_view.py
Original file line number Diff line number Diff line change
@@ -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


Expand All @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions annotation_gui_gcp/lib/views/tools_view.py
Original file line number Diff line number Diff line change
@@ -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")
Expand Down

0 comments on commit 537275b

Please sign in to comment.