Skip to content

Commit 65571c8

Browse files
generatedunixname89002005307016meta-codesync[bot]
authored andcommitted
Remove unused type error suppressions (landing group 13)
Summary: This Phabricator Diff was generated from Pyrefly type-checker output by the per-target upgrade tool. It was not generated by an AI coding system. It changes only type-error suppression comments: it removes suppressions that are no longer needed and adds `# pyrefly: ignore[...]` comments for remaining errors. It does not change Python runtime behavior or application logic. Landing group: `b006083335e073bc2ca6254b2f5d9e3008399f2e4877ce6b40cd895c766fcedf` (attempt 1, 20 batches, 277 files) Merged patch SHA-256: `aebb4bd369eb22e6b9868c505b02f719c74f9889c35ea65470e211969b105f03` Off-peak whole-FBCode run to evaluate the 450-file landing-group cap while removing obsolete suppressions and adding necessary replacements. #pyreupgrade Differential Revision: D126816229 fbshipit-source-id: 0cd7af36f113ca23ffedd90a63f23ea45e16808e
1 parent d45fc9d commit 65571c8

10 files changed

Lines changed: 0 additions & 17 deletions

File tree

‎annotation_gui_gcp/lib/views/cad_view.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ def __init__(
5757
)
5858

5959
def get_model(self) -> Response:
60-
# pyrefly: ignore [bad-argument-type]
6160
return send_file(self.cad_path, mimetype="application/octet-stream")
6261

6362
def process_client_message(self, data: dict[str, Any]) -> None:

‎annotation_gui_gcp/run_ba.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ def triangulate_gcps(
136136
for gcp in gcps:
137137
res = multiview.triangulate_gcp(
138138
gcp,
139-
# pyrefly: ignore [bad-argument-type]
140139
reconstruction.shots,
141140
reproj_threshold=1,
142141
min_ray_angle_degrees=0.1,
@@ -154,7 +153,6 @@ def reproject_gcps(
154153
for gcp in gcps:
155154
point = multiview.triangulate_gcp(
156155
gcp,
157-
# pyrefly: ignore [bad-argument-type]
158156
reconstruction.shots,
159157
reproj_threshold=reproj_threshold,
160158
min_ray_angle_degrees=0.1,
@@ -170,7 +168,6 @@ def reproject_gcps(
170168
if observation.shot_id not in reconstruction.shots:
171169
continue
172170
shot = reconstruction.shots[observation.shot_id]
173-
# pyrefly: ignore [bad-argument-type]
174171
reproj = shot.project(point)
175172
error = np.linalg.norm(reproj - observation.projection)
176173
output[gcp.id][observation.shot_id].update(

‎opensfm/align.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,6 @@ def triangulate_all_gcp(
440440
for point in gcp:
441441
x = multiview.triangulate_gcp(
442442
point,
443-
# pyrefly: ignore [bad-argument-type]
444443
reconstruction.shots,
445444
)
446445
if x is not None and len(point.lla):

‎opensfm/dense.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,6 @@ def compute_depth_range(
380380
for track in tracks_manager.get_shot_observations(shot.id):
381381
if track in reconstruction.points:
382382
p = reconstruction.points[track].coordinates
383-
# pyrefly: ignore [bad-argument-type]
384383
z = shot.pose.transform(p)[2]
385384
depths.append(z)
386385
min_depth = np.percentile(depths, 10) * 0.9

‎opensfm/matching.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ def match_images_with_pairs(
7676
processes = config_override.get("processes", data.config["processes"])
7777
mem_per_process = 512
7878
jobs_per_process = 2
79-
# pyrefly: ignore [bad-argument-type]
8079
processes = context.processes_that_fit_in_memory(processes, mem_per_process)
8180
logger.info("Computing pair matching with %d processes" % processes)
8281
matches = context.parallel_map(match_unwrap_args, args, processes, jobs_per_process)

‎opensfm/mesh.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ def triangle_mesh_perspective(
5858
for track_id in tracks_manager.get_shot_observations(shot_id):
5959
if track_id in r.points:
6060
point = r.points[track_id]
61-
# pyrefly: ignore [bad-argument-type]
6261
pixel = shot.project(point.coordinates)
6362
nonans = not np.isnan(pixel).any()
6463
if nonans and -dx <= pixel[0] <= dx and -dy <= pixel[1] <= dy:
@@ -134,7 +133,6 @@ def triangle_mesh_fisheye(
134133
for track_id in tracks_manager.get_shot_observations(shot_id):
135134
if track_id in r.points:
136135
point = r.points[track_id].coordinates
137-
# pyrefly: ignore [bad-argument-type]
138136
direction = shot.pose.transform(point)
139137
pixel = direction / np.linalg.norm(direction)
140138
if not np.isnan(pixel).any():
@@ -177,7 +175,6 @@ def triangle_mesh_spherical(
177175
for track_id in tracks_manager.get_shot_observations(shot_id):
178176
if track_id in r.points:
179177
point = r.points[track_id].coordinates
180-
# pyrefly: ignore [bad-argument-type]
181178
direction = shot.pose.transform(point)
182179
pixel = direction / np.linalg.norm(direction)
183180
if not np.isnan(pixel).any():

‎opensfm/reconstruction.py‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,6 @@ def resect(
700700
bs, Xs, ids = [], [], []
701701
for track, obs in tracks_manager.get_shot_observations(shot_id).items():
702702
if track in reconstruction.points:
703-
# pyrefly: ignore [bad-argument-type]
704703
b = camera.pixel_bearing(obs.point)
705704
bs.append(b)
706705
Xs.append(reconstruction.points[track].coordinates)
@@ -920,7 +919,6 @@ def triangulate_robust(
920919
for shot_id, obs in self.tracks_handler.get_observations(track).items():
921920
shot = self.reconstruction.shots[shot_id]
922921
os.append(self._shot_origin(shot))
923-
# pyrefly: ignore [bad-argument-type]
924922
b = shot.camera.pixel_bearing(np.array(obs.point))
925923
r = self._shot_rotation_inverse(shot)
926924
bs.append(r.dot(b))
@@ -1025,7 +1023,6 @@ def triangulate(
10251023
for shot_id, obs in self.tracks_handler.get_observations(track).items():
10261024
shot = self.reconstruction.shots[shot_id]
10271025
os.append(self._shot_origin(shot))
1028-
# pyrefly: ignore [bad-argument-type]
10291026
b = shot.camera.pixel_bearing(np.array(obs.point))
10301027
r = self._shot_rotation_inverse(shot)
10311028
bs.append(r.dot(b))
@@ -1066,7 +1063,6 @@ def triangulate_dlt(
10661063
shot = self.reconstruction.shots[shot_id]
10671064
os.append(self._shot_origin(shot))
10681065
Rts.append(self._shot_Rt(shot))
1069-
# pyrefly: ignore [bad-argument-type]
10701066
b = shot.camera.pixel_bearing(np.array(obs.point))
10711067
bs.append(b)
10721068
ids.append(shot_id)

‎opensfm/stats.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ def gcp_errors(
9494

9595
triangulated = None
9696
for rec in reconstructions:
97-
# pyrefly: ignore [bad-argument-type]
9897
triangulated = multiview.triangulate_gcp(gcp, rec.shots, 1.0, 0.1)
9998
if triangulated is None:
10099
continue

‎opensfm/synthetic_data/synthetic_metrics.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def gcp_errors(
5050
if not gcp.lla:
5151
continue
5252

53-
# pyrefly: ignore [bad-argument-type]
5453
triangulated = multiview.triangulate_gcp(gcp, candidate.shots, 1.0, 0.1)
5554
if triangulated is None:
5655
continue

‎opensfm/test/test_datastructures.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,6 @@ def test_point_reproj_errors_assign() -> None:
885885

886886
# When assigning reprojections errors
887887
reproj_errors = {"shot1": np.random.rand(2), "shot2": np.random.rand(2)}
888-
# pyrefly: ignore [bad-argument-type]
889888
pt.reprojection_errors = reproj_errors
890889

891890
# They should be correct

0 commit comments

Comments
 (0)