Skip to content

Commit

Permalink
Turn typing on for mapillary
Browse files Browse the repository at this point in the history
Summary:
We are turning typing on for untyped directory.
to type check your project:

`arc pyre check //buck/pattern/...`

You can enable this by adding `typing = True` to individual buck targets OR

`# in a PACKAGE file
load("fbcode_macros//build_defs:python.bzl", "python") python.set_typing(True)`

will type check all buck targets nested underneath.
This directory contains numerous type annotations that are not currently being type checked by a type checker. This can often lead to a false sense of security, since engineers expect feedback on their type annotations.

Reviewed By: MaggieMoss

Differential Revision: D66179514

fbshipit-source-id: 2279b119a7bc093c3e6f2c66dc92217383e391ef
  • Loading branch information
migeed-z authored and facebook-github-bot committed Nov 19, 2024
1 parent 480556d commit fb6cdbe
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions annotation_gui_gcp/lib/views/cad_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ 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 @@ -43,7 +42,6 @@ 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 @@ -102,7 +100,6 @@ 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 @@ -169,5 +166,4 @@ def sync_to_client(self)->None:
point_id
]

# pyre-fixme[16]: `CADView` has no attribute `send_sse_message`.
self.send_sse_message(data)
1 change: 0 additions & 1 deletion annotation_gui_gcp/lib/views/cp_finder_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ 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
1 change: 0 additions & 1 deletion annotation_gui_gcp/lib/views/image_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ 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: 0 additions & 2 deletions opensfm/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,6 @@ def load_words(self, image: str) -> np.ndarray:

def save_words(self, image: str, words: np.ndarray) -> None:
with self.io_handler.open(self._words_file(image), "wb") as f:
# pyre-fixme[6]: For 1st argument expected `Union[_SupportsWrite[bytes],
# PathLike[str], str]` but got `IO[typing.Any]`.
np.savez_compressed(f, words=words.astype(np.uint16))

def _matches_path(self) -> str:
Expand Down

0 comments on commit fb6cdbe

Please sign in to comment.