From 7ad733935e0c81942e03d8f994844084a925372c Mon Sep 17 00:00:00 2001 From: generatedunixname89002005287564 Date: Sat, 2 Mar 2024 10:20:41 -0800 Subject: [PATCH] Pyre Configurationless migration for] [batch:26/112] [shard:6/N] (#1041) Summary: X-link: https://github.com/facebookincubator/metalos/pull/5 X-link: https://github.com/facebookresearch/fbpcp/pull/527 Pull Request resolved: https://github.com/mapillary/OpenSfM/pull/1041 Reviewed By: connernilsen Differential Revision: D54440273 fbshipit-source-id: 0742c4b76bbef07c68a729f65bc27f1a176b919f --- annotation_gui_gcp/lib/GUI.py | 1 + annotation_gui_gcp/lib/gcp_manager.py | 1 + annotation_gui_gcp/lib/geometry.py | 1 + annotation_gui_gcp/lib/image_manager.py | 1 + annotation_gui_gcp/lib/views/cad_view.py | 1 + annotation_gui_gcp/lib/views/cp_finder_view.py | 1 + annotation_gui_gcp/lib/views/image_view.py | 1 + annotation_gui_gcp/lib/views/tools_view.py | 1 + annotation_gui_gcp/lib/views/web_view.py | 1 + annotation_gui_gcp/main.py | 1 + annotation_gui_gcp/run_ba.py | 1 + bin/import_colmap.py | 2 ++ bin/opensfm_main.py | 1 + bin/plot_matches.py | 2 ++ opensfm/__init__.py | 1 + opensfm/actions/align_submodels.py | 1 + opensfm/actions/bundle.py | 1 + opensfm/actions/compute_depthmaps.py | 1 + opensfm/actions/compute_statistics.py | 1 + opensfm/actions/create_rig.py | 1 + opensfm/actions/create_submodels.py | 1 + opensfm/actions/create_tracks.py | 1 + opensfm/actions/detect_features.py | 1 + opensfm/actions/export_bundler.py | 1 + opensfm/actions/export_colmap.py | 2 ++ opensfm/actions/export_geocoords.py | 1 + opensfm/actions/export_openmvs.py | 1 + opensfm/actions/export_ply.py | 1 + opensfm/actions/export_pmvs.py | 1 + opensfm/actions/export_report.py | 1 + opensfm/actions/export_visualsfm.py | 1 + opensfm/actions/extend_reconstruction.py | 1 + opensfm/actions/extract_metadata.py | 1 + opensfm/actions/match_features.py | 1 + opensfm/actions/mesh.py | 1 + opensfm/actions/reconstruct.py | 1 + opensfm/actions/reconstruct_from_prior.py | 1 + opensfm/actions/undistort.py | 1 + opensfm/align.py | 1 + opensfm/bow.py | 1 + opensfm/commands/__init__.py | 1 + opensfm/commands/align_submodels.py | 1 + opensfm/commands/bundle.py | 1 + opensfm/commands/command.py | 1 + opensfm/commands/command_runner.py | 1 + opensfm/commands/compute_depthmaps.py | 1 + opensfm/commands/compute_statistics.py | 1 + opensfm/commands/create_rig.py | 1 + opensfm/commands/create_submodels.py | 1 + opensfm/commands/create_tracks.py | 1 + opensfm/commands/detect_features.py | 1 + opensfm/commands/export_bundler.py | 1 + opensfm/commands/export_colmap.py | 1 + opensfm/commands/export_geocoords.py | 1 + opensfm/commands/export_openmvs.py | 1 + opensfm/commands/export_ply.py | 1 + opensfm/commands/export_pmvs.py | 1 + opensfm/commands/export_report.py | 1 + opensfm/commands/export_visualsfm.py | 1 + opensfm/commands/extend_reconstruction.py | 1 + opensfm/commands/extract_metadata.py | 1 + opensfm/commands/match_features.py | 1 + opensfm/commands/mesh.py | 1 + opensfm/commands/reconstruct.py | 1 + opensfm/commands/reconstruct_from_prior.py | 1 + opensfm/commands/undistort.py | 1 + opensfm/config.py | 1 + opensfm/context.py | 1 + opensfm/dataset.py | 1 + opensfm/dataset_base.py | 1 + opensfm/dense.py | 1 + opensfm/exif.py | 1 + opensfm/feature_loader.py | 1 + opensfm/feature_loading.py | 1 + opensfm/features.py | 1 + opensfm/features_processing.py | 1 + opensfm/geo.py | 1 + opensfm/geometry.py | 1 + opensfm/geotag_from_gpx.py | 2 ++ opensfm/io.py | 1 + opensfm/large/metadataset.py | 1 + opensfm/large/tools.py | 1 + opensfm/log.py | 1 + opensfm/masking.py | 1 + opensfm/matching.py | 1 + opensfm/mesh.py | 2 ++ opensfm/multiview.py | 1 + opensfm/pairs_selection.py | 1 + opensfm/reconstruction.py | 1 + opensfm/reconstruction_helpers.py | 1 + opensfm/report.py | 1 + opensfm/rig.py | 1 + opensfm/sensors.py | 1 + opensfm/stats.py | 1 + opensfm/synthetic_data/synthetic_dataset.py | 1 + opensfm/synthetic_data/synthetic_examples.py | 1 + opensfm/synthetic_data/synthetic_generator.py | 1 + opensfm/synthetic_data/synthetic_metrics.py | 1 + opensfm/synthetic_data/synthetic_scene.py | 1 + opensfm/test/conftest.py | 1 + opensfm/test/data_generation.py | 1 + opensfm/test/test_bundle.py | 1 + opensfm/test/test_commands.py | 1 + opensfm/test/test_dataset.py | 1 + opensfm/test/test_datastructures.py | 1 + opensfm/test/test_dense.py | 1 + opensfm/test/test_geo.py | 1 + opensfm/test/test_geometry.py | 1 + opensfm/test/test_io.py | 1 + opensfm/test/test_matching.py | 1 + opensfm/test/test_multiview.py | 1 + opensfm/test/test_pairs_selection.py | 1 + opensfm/test/test_reconstruction_alignment.py | 1 + opensfm/test/test_reconstruction_incremental.py | 1 + opensfm/test/test_reconstruction_resect.py | 1 + opensfm/test/test_reconstruction_shot_neighborhood.py | 1 + opensfm/test/test_reconstruction_triangulation.py | 1 + opensfm/test/test_rig.py | 1 + opensfm/test/test_robust.py | 1 + opensfm/test/test_stats.py | 1 + opensfm/test/test_triangulation.py | 1 + opensfm/test/test_types.py | 1 + opensfm/test/test_undistort.py | 1 + opensfm/test/test_vlad.py | 1 + opensfm/test/utils.py | 2 ++ opensfm/tracking.py | 1 + opensfm/transformations.py | 2 ++ opensfm/types.py | 1 + opensfm/undistort.py | 1 + opensfm/unionfind.py | 2 ++ opensfm/upright.py | 1 + opensfm/video.py | 1 + opensfm/vlad.py | 1 + viewer/server.py | 1 + 134 files changed, 142 insertions(+) diff --git a/annotation_gui_gcp/lib/GUI.py b/annotation_gui_gcp/lib/GUI.py index f9953f4d8..44a999ec3 100644 --- a/annotation_gui_gcp/lib/GUI.py +++ b/annotation_gui_gcp/lib/GUI.py @@ -1,3 +1,4 @@ +# pyre-unsafe import os import random import subprocess diff --git a/annotation_gui_gcp/lib/gcp_manager.py b/annotation_gui_gcp/lib/gcp_manager.py index 1a22e1ae7..f5d2858e5 100644 --- a/annotation_gui_gcp/lib/gcp_manager.py +++ b/annotation_gui_gcp/lib/gcp_manager.py @@ -1,3 +1,4 @@ +# pyre-unsafe import json import os import typing as t diff --git a/annotation_gui_gcp/lib/geometry.py b/annotation_gui_gcp/lib/geometry.py index c10b2daa5..1df053f3e 100644 --- a/annotation_gui_gcp/lib/geometry.py +++ b/annotation_gui_gcp/lib/geometry.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm import dataset from numpy import ndarray from typing import Dict, Tuple diff --git a/annotation_gui_gcp/lib/image_manager.py b/annotation_gui_gcp/lib/image_manager.py index bd4d63922..494eeda7a 100644 --- a/annotation_gui_gcp/lib/image_manager.py +++ b/annotation_gui_gcp/lib/image_manager.py @@ -1,3 +1,4 @@ +# pyre-unsafe import typing as t from io import BytesIO diff --git a/annotation_gui_gcp/lib/views/cad_view.py b/annotation_gui_gcp/lib/views/cad_view.py index fb3e46c79..29d1320d3 100644 --- a/annotation_gui_gcp/lib/views/cad_view.py +++ b/annotation_gui_gcp/lib/views/cad_view.py @@ -1,3 +1,4 @@ +# pyre-unsafe import json import logging from pathlib import Path diff --git a/annotation_gui_gcp/lib/views/cp_finder_view.py b/annotation_gui_gcp/lib/views/cp_finder_view.py index af6f3b0a6..b8b491402 100644 --- a/annotation_gui_gcp/lib/views/cp_finder_view.py +++ b/annotation_gui_gcp/lib/views/cp_finder_view.py @@ -1,3 +1,4 @@ +# pyre-unsafe import typing as t from annotation_gui_gcp.lib.views.image_view import ImageView diff --git a/annotation_gui_gcp/lib/views/image_view.py b/annotation_gui_gcp/lib/views/image_view.py index 16dddbed8..efc1a1bdf 100644 --- a/annotation_gui_gcp/lib/views/image_view.py +++ b/annotation_gui_gcp/lib/views/image_view.py @@ -1,3 +1,4 @@ +# pyre-unsafe from typing import Dict, Any from annotation_gui_gcp.lib.views.web_view import WebView, distinct_colors diff --git a/annotation_gui_gcp/lib/views/tools_view.py b/annotation_gui_gcp/lib/views/tools_view.py index 9a70b0482..22a5e9bca 100644 --- a/annotation_gui_gcp/lib/views/tools_view.py +++ b/annotation_gui_gcp/lib/views/tools_view.py @@ -1,3 +1,4 @@ +# pyre-unsafe from typing import Dict, Any from annotation_gui_gcp.lib.views.web_view import WebView diff --git a/annotation_gui_gcp/lib/views/web_view.py b/annotation_gui_gcp/lib/views/web_view.py index a2f93107c..b41dd41e6 100644 --- a/annotation_gui_gcp/lib/views/web_view.py +++ b/annotation_gui_gcp/lib/views/web_view.py @@ -1,3 +1,4 @@ +# pyre-unsafe import abc import json import time diff --git a/annotation_gui_gcp/main.py b/annotation_gui_gcp/main.py index aad365118..41388dbe5 100644 --- a/annotation_gui_gcp/main.py +++ b/annotation_gui_gcp/main.py @@ -1,3 +1,4 @@ +# pyre-unsafe import argparse import json import typing as t diff --git a/annotation_gui_gcp/run_ba.py b/annotation_gui_gcp/run_ba.py index 4e571f8aa..41d54ed59 100644 --- a/annotation_gui_gcp/run_ba.py +++ b/annotation_gui_gcp/run_ba.py @@ -1,3 +1,4 @@ +# pyre-unsafe import argparse import json import logging diff --git a/bin/import_colmap.py b/bin/import_colmap.py index 9388883f4..95a6a2365 100755 --- a/bin/import_colmap.py +++ b/bin/import_colmap.py @@ -1,5 +1,7 @@ #!/usr/bin/env python3 +# pyre-unsafe + # Snippets to read from the colmap database taken from: # https://github.com/colmap/colmap/blob/ad7bd93f1a27af7533121aa043a167fe1490688c / # scripts/python/export_to_bundler.py diff --git a/bin/opensfm_main.py b/bin/opensfm_main.py index 2041e163d..7709b7491 100755 --- a/bin/opensfm_main.py +++ b/bin/opensfm_main.py @@ -1,3 +1,4 @@ +# pyre-unsafe import sys from os.path import abspath, dirname, join diff --git a/bin/plot_matches.py b/bin/plot_matches.py index 2fe59174b..ab94b2e94 100755 --- a/bin/plot_matches.py +++ b/bin/plot_matches.py @@ -1,5 +1,7 @@ #!/usr/bin/env python3 +# pyre-unsafe + import argparse import os.path from itertools import combinations diff --git a/opensfm/__init__.py b/opensfm/__init__.py index 011058c79..8cd78b225 100644 --- a/opensfm/__init__.py +++ b/opensfm/__init__.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm import pybundle from opensfm import pydense from opensfm import pyfeatures diff --git a/opensfm/actions/align_submodels.py b/opensfm/actions/align_submodels.py index 3e70501f4..28fc2a525 100644 --- a/opensfm/actions/align_submodels.py +++ b/opensfm/actions/align_submodels.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm.large import metadataset from opensfm.large import tools from opensfm.dataset import DataSet diff --git a/opensfm/actions/bundle.py b/opensfm/actions/bundle.py index fa4afdc48..28c08dd14 100644 --- a/opensfm/actions/bundle.py +++ b/opensfm/actions/bundle.py @@ -1,3 +1,4 @@ +# pyre-unsafe import opensfm.reconstruction as orec from opensfm.dataset_base import DataSetBase from typing import Optional diff --git a/opensfm/actions/compute_depthmaps.py b/opensfm/actions/compute_depthmaps.py index d16f06e59..e7972c226 100644 --- a/opensfm/actions/compute_depthmaps.py +++ b/opensfm/actions/compute_depthmaps.py @@ -1,3 +1,4 @@ +# pyre-unsafe import os from opensfm import dataset diff --git a/opensfm/actions/compute_statistics.py b/opensfm/actions/compute_statistics.py index 736c11706..0b8eb057a 100644 --- a/opensfm/actions/compute_statistics.py +++ b/opensfm/actions/compute_statistics.py @@ -1,3 +1,4 @@ +# pyre-unsafe import logging import os diff --git a/opensfm/actions/create_rig.py b/opensfm/actions/create_rig.py index 823f9f019..50b1608fb 100644 --- a/opensfm/actions/create_rig.py +++ b/opensfm/actions/create_rig.py @@ -1,3 +1,4 @@ +# pyre-unsafe import logging from opensfm import pymap, rig, reconstruction_helpers as helpers, types diff --git a/opensfm/actions/create_submodels.py b/opensfm/actions/create_submodels.py index 08ef8e205..2716a0603 100644 --- a/opensfm/actions/create_submodels.py +++ b/opensfm/actions/create_submodels.py @@ -1,3 +1,4 @@ +# pyre-unsafe import logging from collections import defaultdict diff --git a/opensfm/actions/create_tracks.py b/opensfm/actions/create_tracks.py index e119eb07f..1a0db6e4f 100644 --- a/opensfm/actions/create_tracks.py +++ b/opensfm/actions/create_tracks.py @@ -1,3 +1,4 @@ +# pyre-unsafe from timeit import default_timer as timer from opensfm import io diff --git a/opensfm/actions/detect_features.py b/opensfm/actions/detect_features.py index a84f6791b..9bf47cfed 100644 --- a/opensfm/actions/detect_features.py +++ b/opensfm/actions/detect_features.py @@ -1,3 +1,4 @@ +# pyre-unsafe import logging from timeit import default_timer as timer diff --git a/opensfm/actions/export_bundler.py b/opensfm/actions/export_bundler.py index 9a6002aa3..1535ff795 100644 --- a/opensfm/actions/export_bundler.py +++ b/opensfm/actions/export_bundler.py @@ -1,3 +1,4 @@ +# pyre-unsafe import os import numpy as np diff --git a/opensfm/actions/export_colmap.py b/opensfm/actions/export_colmap.py index ab275e074..c86e38fa9 100644 --- a/opensfm/actions/export_colmap.py +++ b/opensfm/actions/export_colmap.py @@ -29,6 +29,8 @@ # # Author: Johannes L. Schoenberger (jsch at inf.ethz.ch) +# pyre-unsafe + # This script is based on an original implementation by True Price. import math diff --git a/opensfm/actions/export_geocoords.py b/opensfm/actions/export_geocoords.py index 67b1f7233..aad9d7910 100644 --- a/opensfm/actions/export_geocoords.py +++ b/opensfm/actions/export_geocoords.py @@ -1,3 +1,4 @@ +# pyre-unsafe import logging import os from opensfm import types diff --git a/opensfm/actions/export_openmvs.py b/opensfm/actions/export_openmvs.py index 7d3edc8ab..2020913d6 100644 --- a/opensfm/actions/export_openmvs.py +++ b/opensfm/actions/export_openmvs.py @@ -1,3 +1,4 @@ +# pyre-unsafe import os import numpy as np diff --git a/opensfm/actions/export_ply.py b/opensfm/actions/export_ply.py index 3e718c01b..69658ce4f 100644 --- a/opensfm/actions/export_ply.py +++ b/opensfm/actions/export_ply.py @@ -1,3 +1,4 @@ +# pyre-unsafe import os import numpy as np diff --git a/opensfm/actions/export_pmvs.py b/opensfm/actions/export_pmvs.py index 264fb2e4a..de11b4974 100644 --- a/opensfm/actions/export_pmvs.py +++ b/opensfm/actions/export_pmvs.py @@ -1,3 +1,4 @@ +# pyre-unsafe import logging import os diff --git a/opensfm/actions/export_report.py b/opensfm/actions/export_report.py index 8b50e4f49..d20ac0a3a 100644 --- a/opensfm/actions/export_report.py +++ b/opensfm/actions/export_report.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm import report from opensfm.dataset import DataSet diff --git a/opensfm/actions/export_visualsfm.py b/opensfm/actions/export_visualsfm.py index 1b1ce0846..1f91b0811 100644 --- a/opensfm/actions/export_visualsfm.py +++ b/opensfm/actions/export_visualsfm.py @@ -1,3 +1,4 @@ +# pyre-unsafe import logging import os import sys diff --git a/opensfm/actions/extend_reconstruction.py b/opensfm/actions/extend_reconstruction.py index 2d9bd303d..adc9ea78b 100644 --- a/opensfm/actions/extend_reconstruction.py +++ b/opensfm/actions/extend_reconstruction.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm import io, reconstruction from opensfm.dataset_base import DataSetBase from typing import Optional diff --git a/opensfm/actions/extract_metadata.py b/opensfm/actions/extract_metadata.py index b7f5fcbae..6d58383d3 100644 --- a/opensfm/actions/extract_metadata.py +++ b/opensfm/actions/extract_metadata.py @@ -1,3 +1,4 @@ +# pyre-unsafe import copy import logging from functools import partial diff --git a/opensfm/actions/match_features.py b/opensfm/actions/match_features.py index 84b1937a1..9cd8d8433 100644 --- a/opensfm/actions/match_features.py +++ b/opensfm/actions/match_features.py @@ -1,3 +1,4 @@ +# pyre-unsafe from timeit import default_timer as timer from opensfm import io diff --git a/opensfm/actions/mesh.py b/opensfm/actions/mesh.py index d3a952c93..203e3bf86 100644 --- a/opensfm/actions/mesh.py +++ b/opensfm/actions/mesh.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm import mesh from opensfm.dataset_base import DataSetBase diff --git a/opensfm/actions/reconstruct.py b/opensfm/actions/reconstruct.py index 9c952fd7d..d5b30420d 100644 --- a/opensfm/actions/reconstruct.py +++ b/opensfm/actions/reconstruct.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm import io from opensfm import reconstruction from opensfm.dataset_base import DataSetBase diff --git a/opensfm/actions/reconstruct_from_prior.py b/opensfm/actions/reconstruct_from_prior.py index 067be1fa2..e5d86232e 100644 --- a/opensfm/actions/reconstruct_from_prior.py +++ b/opensfm/actions/reconstruct_from_prior.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm import io from opensfm import reconstruction from opensfm.dataset_base import DataSetBase diff --git a/opensfm/actions/undistort.py b/opensfm/actions/undistort.py index 1f1a129de..5d9bcd220 100644 --- a/opensfm/actions/undistort.py +++ b/opensfm/actions/undistort.py @@ -1,3 +1,4 @@ +# pyre-unsafe import os from typing import Optional diff --git a/opensfm/align.py b/opensfm/align.py index 383109564..48d7d60c3 100644 --- a/opensfm/align.py +++ b/opensfm/align.py @@ -1,3 +1,4 @@ +# pyre-unsafe """Tools to align a reconstruction to GPS and GCP data.""" import logging diff --git a/opensfm/bow.py b/opensfm/bow.py index 544bcb079..f4746c469 100644 --- a/opensfm/bow.py +++ b/opensfm/bow.py @@ -1,3 +1,4 @@ +# pyre-unsafe import os.path import cv2 diff --git a/opensfm/commands/__init__.py b/opensfm/commands/__init__.py index 426afebd7..97a2f32fe 100644 --- a/opensfm/commands/__init__.py +++ b/opensfm/commands/__init__.py @@ -1,3 +1,4 @@ +# pyre-unsafe from . import ( align_submodels, bundle, diff --git a/opensfm/commands/align_submodels.py b/opensfm/commands/align_submodels.py index f3bc8c917..8055c45bd 100644 --- a/opensfm/commands/align_submodels.py +++ b/opensfm/commands/align_submodels.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm.actions import align_submodels from . import command diff --git a/opensfm/commands/bundle.py b/opensfm/commands/bundle.py index b7e6f668a..767d73146 100644 --- a/opensfm/commands/bundle.py +++ b/opensfm/commands/bundle.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm.actions import bundle from . import command diff --git a/opensfm/commands/command.py b/opensfm/commands/command.py index 077c7c811..2e7093e93 100644 --- a/opensfm/commands/command.py +++ b/opensfm/commands/command.py @@ -1,3 +1,4 @@ +# pyre-unsafe from timeit import default_timer as timer import argparse from opensfm.dataset import DataSet diff --git a/opensfm/commands/command_runner.py b/opensfm/commands/command_runner.py index 6498a7ef6..55b556903 100644 --- a/opensfm/commands/command_runner.py +++ b/opensfm/commands/command_runner.py @@ -1,3 +1,4 @@ +# pyre-unsafe from typing import Any, Callable, List import argparse diff --git a/opensfm/commands/compute_depthmaps.py b/opensfm/commands/compute_depthmaps.py index 57c647947..6265b6fd3 100644 --- a/opensfm/commands/compute_depthmaps.py +++ b/opensfm/commands/compute_depthmaps.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm.actions import compute_depthmaps from . import command diff --git a/opensfm/commands/compute_statistics.py b/opensfm/commands/compute_statistics.py index a445fc7c4..8b6544a30 100644 --- a/opensfm/commands/compute_statistics.py +++ b/opensfm/commands/compute_statistics.py @@ -1,3 +1,4 @@ +# pyre-unsafe from . import command import argparse from opensfm.dataset import DataSet diff --git a/opensfm/commands/create_rig.py b/opensfm/commands/create_rig.py index 120e471b9..82d191156 100644 --- a/opensfm/commands/create_rig.py +++ b/opensfm/commands/create_rig.py @@ -1,3 +1,4 @@ +# pyre-unsafe import json from opensfm.actions import create_rig diff --git a/opensfm/commands/create_submodels.py b/opensfm/commands/create_submodels.py index bc76dcba8..a6d301103 100644 --- a/opensfm/commands/create_submodels.py +++ b/opensfm/commands/create_submodels.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm.actions import create_submodels from . import command diff --git a/opensfm/commands/create_tracks.py b/opensfm/commands/create_tracks.py index d5ee6e6ac..408c67a53 100644 --- a/opensfm/commands/create_tracks.py +++ b/opensfm/commands/create_tracks.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm.actions import create_tracks from . import command diff --git a/opensfm/commands/detect_features.py b/opensfm/commands/detect_features.py index b94f83289..466826e52 100644 --- a/opensfm/commands/detect_features.py +++ b/opensfm/commands/detect_features.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm.actions import detect_features from . import command diff --git a/opensfm/commands/export_bundler.py b/opensfm/commands/export_bundler.py index 13bb1a241..83be840d3 100644 --- a/opensfm/commands/export_bundler.py +++ b/opensfm/commands/export_bundler.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm.actions import export_bundler from . import command diff --git a/opensfm/commands/export_colmap.py b/opensfm/commands/export_colmap.py index b5fab0a00..79c4b86ac 100644 --- a/opensfm/commands/export_colmap.py +++ b/opensfm/commands/export_colmap.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm.actions import export_colmap from . import command diff --git a/opensfm/commands/export_geocoords.py b/opensfm/commands/export_geocoords.py index 155a91bca..1f3b4e219 100644 --- a/opensfm/commands/export_geocoords.py +++ b/opensfm/commands/export_geocoords.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm.actions import export_geocoords from . import command diff --git a/opensfm/commands/export_openmvs.py b/opensfm/commands/export_openmvs.py index 7476c6fad..91dbb595e 100644 --- a/opensfm/commands/export_openmvs.py +++ b/opensfm/commands/export_openmvs.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm.actions import export_openmvs from . import command diff --git a/opensfm/commands/export_ply.py b/opensfm/commands/export_ply.py index 7e4892968..1d3be5f00 100644 --- a/opensfm/commands/export_ply.py +++ b/opensfm/commands/export_ply.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm.actions import export_ply from . import command diff --git a/opensfm/commands/export_pmvs.py b/opensfm/commands/export_pmvs.py index 9a39d5ccd..84d67c656 100644 --- a/opensfm/commands/export_pmvs.py +++ b/opensfm/commands/export_pmvs.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm.actions import export_pmvs from . import command diff --git a/opensfm/commands/export_report.py b/opensfm/commands/export_report.py index ab6722ee2..d9f084329 100644 --- a/opensfm/commands/export_report.py +++ b/opensfm/commands/export_report.py @@ -1,3 +1,4 @@ +# pyre-unsafe from . import command import argparse from opensfm.dataset import DataSet diff --git a/opensfm/commands/export_visualsfm.py b/opensfm/commands/export_visualsfm.py index c0b65eead..37080add9 100644 --- a/opensfm/commands/export_visualsfm.py +++ b/opensfm/commands/export_visualsfm.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm.actions import export_visualsfm from . import command diff --git a/opensfm/commands/extend_reconstruction.py b/opensfm/commands/extend_reconstruction.py index 2804c5382..6e72374e5 100644 --- a/opensfm/commands/extend_reconstruction.py +++ b/opensfm/commands/extend_reconstruction.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm.actions import extend_reconstruction from . import command diff --git a/opensfm/commands/extract_metadata.py b/opensfm/commands/extract_metadata.py index c51879103..5bf0d62b1 100644 --- a/opensfm/commands/extract_metadata.py +++ b/opensfm/commands/extract_metadata.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm.actions import extract_metadata from . import command diff --git a/opensfm/commands/match_features.py b/opensfm/commands/match_features.py index 5739c1801..74e88984f 100644 --- a/opensfm/commands/match_features.py +++ b/opensfm/commands/match_features.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm.actions import match_features from . import command diff --git a/opensfm/commands/mesh.py b/opensfm/commands/mesh.py index c762d97c3..6a407cab4 100644 --- a/opensfm/commands/mesh.py +++ b/opensfm/commands/mesh.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm.actions import mesh from . import command diff --git a/opensfm/commands/reconstruct.py b/opensfm/commands/reconstruct.py index bfccf9eba..5dcb002f2 100644 --- a/opensfm/commands/reconstruct.py +++ b/opensfm/commands/reconstruct.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm import reconstruction from opensfm.actions import reconstruct diff --git a/opensfm/commands/reconstruct_from_prior.py b/opensfm/commands/reconstruct_from_prior.py index f4271e98a..0aa7389ef 100644 --- a/opensfm/commands/reconstruct_from_prior.py +++ b/opensfm/commands/reconstruct_from_prior.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm.actions import reconstruct_from_prior from . import command diff --git a/opensfm/commands/undistort.py b/opensfm/commands/undistort.py index d9f99eb62..d7eae5d6e 100644 --- a/opensfm/commands/undistort.py +++ b/opensfm/commands/undistort.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm.actions import undistort from . import command diff --git a/opensfm/config.py b/opensfm/config.py index 4ef433a17..907e9c1ed 100644 --- a/opensfm/config.py +++ b/opensfm/config.py @@ -1,3 +1,4 @@ +# pyre-unsafe import os from dataclasses import dataclass, asdict from typing import Any, Dict, IO, Union diff --git a/opensfm/context.py b/opensfm/context.py index 58fa25296..00ea4074e 100644 --- a/opensfm/context.py +++ b/opensfm/context.py @@ -1,3 +1,4 @@ +# pyre-unsafe import logging import os diff --git a/opensfm/dataset.py b/opensfm/dataset.py index ff825a272..12af6a344 100644 --- a/opensfm/dataset.py +++ b/opensfm/dataset.py @@ -1,3 +1,4 @@ +# pyre-unsafe import gzip import json import logging diff --git a/opensfm/dataset_base.py b/opensfm/dataset_base.py index 9f3c64068..a049344e9 100644 --- a/opensfm/dataset_base.py +++ b/opensfm/dataset_base.py @@ -1,3 +1,4 @@ +# pyre-unsafe import logging from abc import ABC, abstractmethod from typing import Dict, List, Tuple, Optional, IO, Any diff --git a/opensfm/dense.py b/opensfm/dense.py index 49cd18365..14b4fc940 100644 --- a/opensfm/dense.py +++ b/opensfm/dense.py @@ -1,3 +1,4 @@ +# pyre-unsafe import logging import typing as t diff --git a/opensfm/exif.py b/opensfm/exif.py index d46ead2d8..6b4e76462 100644 --- a/opensfm/exif.py +++ b/opensfm/exif.py @@ -1,3 +1,4 @@ +# pyre-unsafe import datetime import logging from codecs import encode, decode diff --git a/opensfm/feature_loader.py b/opensfm/feature_loader.py index eac0cb4cc..d9a3ad086 100644 --- a/opensfm/feature_loader.py +++ b/opensfm/feature_loader.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm import feature_loading diff --git a/opensfm/feature_loading.py b/opensfm/feature_loading.py index f985b6869..7ff3d4934 100644 --- a/opensfm/feature_loading.py +++ b/opensfm/feature_loading.py @@ -1,3 +1,4 @@ +# pyre-unsafe import logging from functools import lru_cache from typing import Optional, Tuple, Any diff --git a/opensfm/features.py b/opensfm/features.py index d4dbac37d..622c47ae2 100644 --- a/opensfm/features.py +++ b/opensfm/features.py @@ -1,3 +1,4 @@ +# pyre-unsafe """Tools to extract features.""" import logging diff --git a/opensfm/features_processing.py b/opensfm/features_processing.py index 52ce8c29c..94889eac9 100644 --- a/opensfm/features_processing.py +++ b/opensfm/features_processing.py @@ -1,3 +1,4 @@ +# pyre-unsafe import itertools import logging import math diff --git a/opensfm/geo.py b/opensfm/geo.py index 90c3d3d9d..335dad66f 100644 --- a/opensfm/geo.py +++ b/opensfm/geo.py @@ -1,3 +1,4 @@ +# pyre-unsafe import numpy as np from numpy import ndarray from typing import Tuple diff --git a/opensfm/geometry.py b/opensfm/geometry.py index 654a17469..43cd52a12 100644 --- a/opensfm/geometry.py +++ b/opensfm/geometry.py @@ -1,3 +1,4 @@ +# pyre-unsafe from typing import Tuple import cv2 diff --git a/opensfm/geotag_from_gpx.py b/opensfm/geotag_from_gpx.py index a206f907d..9198b3398 100644 --- a/opensfm/geotag_from_gpx.py +++ b/opensfm/geotag_from_gpx.py @@ -1,5 +1,7 @@ #!/usr/bin/python3 +# pyre-unsafe + import datetime import math import os diff --git a/opensfm/io.py b/opensfm/io.py index 95eaedfa3..bf72ae9f3 100644 --- a/opensfm/io.py +++ b/opensfm/io.py @@ -1,3 +1,4 @@ +# pyre-unsafe import json import logging import os diff --git a/opensfm/large/metadataset.py b/opensfm/large/metadataset.py index 81a016f6e..df5a27a7b 100644 --- a/opensfm/large/metadataset.py +++ b/opensfm/large/metadataset.py @@ -1,3 +1,4 @@ +# pyre-unsafe import os import os.path import shutil diff --git a/opensfm/large/tools.py b/opensfm/large/tools.py index e66c0d35e..fff5b6536 100644 --- a/opensfm/large/tools.py +++ b/opensfm/large/tools.py @@ -1,3 +1,4 @@ +# pyre-unsafe import itertools import logging from collections import namedtuple diff --git a/opensfm/log.py b/opensfm/log.py index 379a3a53b..ecca50c12 100644 --- a/opensfm/log.py +++ b/opensfm/log.py @@ -1,3 +1,4 @@ +# pyre-unsafe import logging import os from typing import Optional diff --git a/opensfm/masking.py b/opensfm/masking.py index 37bfe0ec8..3a20a86f7 100644 --- a/opensfm/masking.py +++ b/opensfm/masking.py @@ -1,3 +1,4 @@ +# pyre-unsafe import logging from typing import List, Tuple, Optional diff --git a/opensfm/matching.py b/opensfm/matching.py index 068d126e9..a96eee3f0 100644 --- a/opensfm/matching.py +++ b/opensfm/matching.py @@ -1,3 +1,4 @@ +# pyre-unsafe import logging from timeit import default_timer as timer from typing import Any, Dict, Generator, List, Optional, Sized, Tuple diff --git a/opensfm/mesh.py b/opensfm/mesh.py index 47447c275..9080a0a74 100644 --- a/opensfm/mesh.py +++ b/opensfm/mesh.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 + +# pyre-unsafe import itertools import logging from typing import Any, Tuple, List diff --git a/opensfm/multiview.py b/opensfm/multiview.py index 65dd3ea07..e6f37e9c0 100644 --- a/opensfm/multiview.py +++ b/opensfm/multiview.py @@ -1,3 +1,4 @@ +# pyre-unsafe import math import random from typing import Any, Dict, List, Optional, Tuple diff --git a/opensfm/pairs_selection.py b/opensfm/pairs_selection.py index 191ab030e..214e251b3 100644 --- a/opensfm/pairs_selection.py +++ b/opensfm/pairs_selection.py @@ -1,3 +1,4 @@ +# pyre-unsafe import copy import logging import math diff --git a/opensfm/reconstruction.py b/opensfm/reconstruction.py index eaa6a6a15..ad242f9ee 100644 --- a/opensfm/reconstruction.py +++ b/opensfm/reconstruction.py @@ -1,3 +1,4 @@ +# pyre-unsafe """Incremental reconstruction pipeline""" import datetime diff --git a/opensfm/reconstruction_helpers.py b/opensfm/reconstruction_helpers.py index 0b8787801..48aa4663b 100644 --- a/opensfm/reconstruction_helpers.py +++ b/opensfm/reconstruction_helpers.py @@ -1,3 +1,4 @@ +# pyre-unsafe import logging import math from typing import Any, Dict, Iterable, List, Optional diff --git a/opensfm/report.py b/opensfm/report.py index b1bf5f859..410f0a016 100644 --- a/opensfm/report.py +++ b/opensfm/report.py @@ -1,3 +1,4 @@ +# pyre-unsafe import logging import os import subprocess diff --git a/opensfm/rig.py b/opensfm/rig.py index e20003e42..d21380228 100644 --- a/opensfm/rig.py +++ b/opensfm/rig.py @@ -1,3 +1,4 @@ +# pyre-unsafe """Tool for handling rigs""" import logging diff --git a/opensfm/sensors.py b/opensfm/sensors.py index 7ff93f13c..9e2cc8796 100644 --- a/opensfm/sensors.py +++ b/opensfm/sensors.py @@ -1,3 +1,4 @@ +# pyre-unsafe from functools import lru_cache from typing import Any, Dict, List import yaml diff --git a/opensfm/stats.py b/opensfm/stats.py index 5cc3a5151..44dc31a05 100644 --- a/opensfm/stats.py +++ b/opensfm/stats.py @@ -1,3 +1,4 @@ +# pyre-unsafe import datetime import math import os diff --git a/opensfm/synthetic_data/synthetic_dataset.py b/opensfm/synthetic_data/synthetic_dataset.py index a6023010d..b52cdfcd7 100644 --- a/opensfm/synthetic_data/synthetic_dataset.py +++ b/opensfm/synthetic_data/synthetic_dataset.py @@ -1,3 +1,4 @@ +# pyre-unsafe import collections import logging import os diff --git a/opensfm/synthetic_data/synthetic_examples.py b/opensfm/synthetic_data/synthetic_examples.py index c17589395..2632854b5 100644 --- a/opensfm/synthetic_data/synthetic_examples.py +++ b/opensfm/synthetic_data/synthetic_examples.py @@ -1,3 +1,4 @@ +# pyre-unsafe from typing import Optional import opensfm.synthetic_data.synthetic_scene as ss diff --git a/opensfm/synthetic_data/synthetic_generator.py b/opensfm/synthetic_data/synthetic_generator.py index 6037761fa..90b3fc8da 100644 --- a/opensfm/synthetic_data/synthetic_generator.py +++ b/opensfm/synthetic_data/synthetic_generator.py @@ -1,3 +1,4 @@ +# pyre-unsafe import logging import math import time diff --git a/opensfm/synthetic_data/synthetic_metrics.py b/opensfm/synthetic_data/synthetic_metrics.py index baabb3853..762060aa8 100644 --- a/opensfm/synthetic_data/synthetic_metrics.py +++ b/opensfm/synthetic_data/synthetic_metrics.py @@ -1,3 +1,4 @@ +# pyre-unsafe from typing import Tuple, List, Dict import cv2 diff --git a/opensfm/synthetic_data/synthetic_scene.py b/opensfm/synthetic_data/synthetic_scene.py index 5a1e4f230..f8fcc8140 100644 --- a/opensfm/synthetic_data/synthetic_scene.py +++ b/opensfm/synthetic_data/synthetic_scene.py @@ -1,3 +1,4 @@ +# pyre-unsafe import functools import math from typing import Dict, Optional, List, Any, Union, Tuple, Callable diff --git a/opensfm/test/conftest.py b/opensfm/test/conftest.py index b8cc2ed9a..78331cd35 100644 --- a/opensfm/test/conftest.py +++ b/opensfm/test/conftest.py @@ -1,3 +1,4 @@ +# pyre-unsafe from collections import defaultdict from distutils.version import LooseVersion from typing import Dict, List, Tuple diff --git a/opensfm/test/data_generation.py b/opensfm/test/data_generation.py index 097d53c09..821f3a8b1 100644 --- a/opensfm/test/data_generation.py +++ b/opensfm/test/data_generation.py @@ -1,3 +1,4 @@ +# pyre-unsafe import os import opensfm.dataset diff --git a/opensfm/test/test_bundle.py b/opensfm/test/test_bundle.py index a3e12afaf..54202da06 100644 --- a/opensfm/test/test_bundle.py +++ b/opensfm/test/test_bundle.py @@ -1,3 +1,4 @@ +# pyre-unsafe import copy import numpy as np diff --git a/opensfm/test/test_commands.py b/opensfm/test/test_commands.py index 2e30159b8..a5890bcd9 100644 --- a/opensfm/test/test_commands.py +++ b/opensfm/test/test_commands.py @@ -1,3 +1,4 @@ +# pyre-unsafe import argparse from os.path import join diff --git a/opensfm/test/test_dataset.py b/opensfm/test/test_dataset.py index 02202e45d..60022ae0a 100644 --- a/opensfm/test/test_dataset.py +++ b/opensfm/test/test_dataset.py @@ -1,3 +1,4 @@ +# pyre-unsafe import numpy as np from opensfm import features from opensfm.test import data_generation diff --git a/opensfm/test/test_datastructures.py b/opensfm/test/test_datastructures.py index 2e8d1a25e..5e9c5cd9a 100644 --- a/opensfm/test/test_datastructures.py +++ b/opensfm/test/test_datastructures.py @@ -1,3 +1,4 @@ +# pyre-unsafe import copy from opensfm.pymap import RigCamera, RigInstance, Shot from opensfm.types import Reconstruction diff --git a/opensfm/test/test_dense.py b/opensfm/test/test_dense.py index 5f2bb9789..2c7bdd28e 100644 --- a/opensfm/test/test_dense.py +++ b/opensfm/test/test_dense.py @@ -1,3 +1,4 @@ +# pyre-unsafe import numpy as np from opensfm import dense from opensfm import pygeometry diff --git a/opensfm/test/test_geo.py b/opensfm/test/test_geo.py index a6d534be4..65c3b12bd 100644 --- a/opensfm/test/test_geo.py +++ b/opensfm/test/test_geo.py @@ -1,3 +1,4 @@ +# pyre-unsafe import numpy as np from opensfm import geo, pygeo diff --git a/opensfm/test/test_geometry.py b/opensfm/test/test_geometry.py index ccb5ec728..4d5890198 100644 --- a/opensfm/test/test_geometry.py +++ b/opensfm/test/test_geometry.py @@ -1,3 +1,4 @@ +# pyre-unsafe import numpy as np from opensfm import geometry diff --git a/opensfm/test/test_io.py b/opensfm/test/test_io.py index 23c90c140..0b43af2c5 100644 --- a/opensfm/test/test_io.py +++ b/opensfm/test/test_io.py @@ -1,3 +1,4 @@ +# pyre-unsafe import json import os.path from io import StringIO diff --git a/opensfm/test/test_matching.py b/opensfm/test/test_matching.py index c397b7ee1..c236de723 100644 --- a/opensfm/test/test_matching.py +++ b/opensfm/test/test_matching.py @@ -1,3 +1,4 @@ +# pyre-unsafe from typing import Any, Dict, List, Set, Tuple import numpy as np diff --git a/opensfm/test/test_multiview.py b/opensfm/test/test_multiview.py index ab943fe41..a0e6f1376 100644 --- a/opensfm/test/test_multiview.py +++ b/opensfm/test/test_multiview.py @@ -1,3 +1,4 @@ +# pyre-unsafe import copy import numpy as np diff --git a/opensfm/test/test_pairs_selection.py b/opensfm/test/test_pairs_selection.py index 3fdc04145..b16a2ce69 100644 --- a/opensfm/test/test_pairs_selection.py +++ b/opensfm/test/test_pairs_selection.py @@ -1,3 +1,4 @@ +# pyre-unsafe import argparse import os.path from typing import Any, Dict, Generator diff --git a/opensfm/test/test_reconstruction_alignment.py b/opensfm/test/test_reconstruction_alignment.py index fb2f156c4..a077cca4a 100644 --- a/opensfm/test/test_reconstruction_alignment.py +++ b/opensfm/test/test_reconstruction_alignment.py @@ -1,3 +1,4 @@ +# pyre-unsafe import numpy as np from opensfm import pybundle from opensfm import pygeometry diff --git a/opensfm/test/test_reconstruction_incremental.py b/opensfm/test/test_reconstruction_incremental.py index e1513dab5..1d3320e34 100644 --- a/opensfm/test/test_reconstruction_incremental.py +++ b/opensfm/test/test_reconstruction_incremental.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm import reconstruction from opensfm.synthetic_data import synthetic_dataset, synthetic_scene diff --git a/opensfm/test/test_reconstruction_resect.py b/opensfm/test/test_reconstruction_resect.py index 3a5e1f4dc..f55448d1a 100644 --- a/opensfm/test/test_reconstruction_resect.py +++ b/opensfm/test/test_reconstruction_resect.py @@ -1,3 +1,4 @@ +# pyre-unsafe import numpy as np from opensfm import config, multiview, pymap, reconstruction, types from typing import Tuple diff --git a/opensfm/test/test_reconstruction_shot_neighborhood.py b/opensfm/test/test_reconstruction_shot_neighborhood.py index d302a7fa7..f42f98603 100644 --- a/opensfm/test/test_reconstruction_shot_neighborhood.py +++ b/opensfm/test/test_reconstruction_shot_neighborhood.py @@ -1,3 +1,4 @@ +# pyre-unsafe import networkx as nx from opensfm import pygeometry from opensfm import pymap diff --git a/opensfm/test/test_reconstruction_triangulation.py b/opensfm/test/test_reconstruction_triangulation.py index a05056681..9f631872a 100644 --- a/opensfm/test/test_reconstruction_triangulation.py +++ b/opensfm/test/test_reconstruction_triangulation.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm import reconstruction from opensfm.synthetic_data import synthetic_dataset, synthetic_scene diff --git a/opensfm/test/test_rig.py b/opensfm/test/test_rig.py index 56fd95161..50677f3cc 100644 --- a/opensfm/test/test_rig.py +++ b/opensfm/test/test_rig.py @@ -1,3 +1,4 @@ +# pyre-unsafe """Test the rig module.""" import numpy as np from opensfm import pygeometry, rig, types diff --git a/opensfm/test/test_robust.py b/opensfm/test/test_robust.py index ed296dd4c..6c02d71a9 100644 --- a/opensfm/test/test_robust.py +++ b/opensfm/test/test_robust.py @@ -1,3 +1,4 @@ +# pyre-unsafe import copy from typing import Tuple diff --git a/opensfm/test/test_stats.py b/opensfm/test/test_stats.py index b486794eb..2511fb255 100644 --- a/opensfm/test/test_stats.py +++ b/opensfm/test/test_stats.py @@ -1,3 +1,4 @@ +# pyre-unsafe from opensfm import stats, types from opensfm.synthetic_data import synthetic_dataset, synthetic_scene diff --git a/opensfm/test/test_triangulation.py b/opensfm/test/test_triangulation.py index 1620931c9..734be5d6c 100644 --- a/opensfm/test/test_triangulation.py +++ b/opensfm/test/test_triangulation.py @@ -1,3 +1,4 @@ +# pyre-unsafe import numpy as np from opensfm import io from opensfm import pygeometry diff --git a/opensfm/test/test_types.py b/opensfm/test/test_types.py index 01a27f560..679c2ab02 100644 --- a/opensfm/test/test_types.py +++ b/opensfm/test/test_types.py @@ -1,3 +1,4 @@ +# pyre-unsafe import copy import sys diff --git a/opensfm/test/test_undistort.py b/opensfm/test/test_undistort.py index 3ea656967..e5e8120f6 100644 --- a/opensfm/test/test_undistort.py +++ b/opensfm/test/test_undistort.py @@ -1,3 +1,4 @@ +# pyre-unsafe import itertools import numpy as np diff --git a/opensfm/test/test_vlad.py b/opensfm/test/test_vlad.py index c406195c0..dee12fa08 100644 --- a/opensfm/test/test_vlad.py +++ b/opensfm/test/test_vlad.py @@ -1,3 +1,4 @@ +# pyre-unsafe import numpy as np import pytest from opensfm import vlad diff --git a/opensfm/test/utils.py b/opensfm/test/utils.py index 0531458d9..562bbd1fe 100644 --- a/opensfm/test/utils.py +++ b/opensfm/test/utils.py @@ -1,4 +1,6 @@ # Test utils for python + +# pyre-unsafe import numpy as np from opensfm import pygeo, pygeometry, pymap diff --git a/opensfm/tracking.py b/opensfm/tracking.py index 4cb699ee4..c1b79798c 100644 --- a/opensfm/tracking.py +++ b/opensfm/tracking.py @@ -1,3 +1,4 @@ +# pyre-unsafe import logging import typing as t diff --git a/opensfm/transformations.py b/opensfm/transformations.py index 96bcd6bdc..071915b64 100644 --- a/opensfm/transformations.py +++ b/opensfm/transformations.py @@ -1,5 +1,7 @@ # transformations.py +# pyre-unsafe + # Copyright (c) 2006-2013, Christoph Gohlke # Copyright (c) 2006-2013, The Regents of the University of California # Produced at the Laboratory for Fluorescence Dynamics diff --git a/opensfm/types.py b/opensfm/types.py index 7e444b9c9..6492e8509 100644 --- a/opensfm/types.py +++ b/opensfm/types.py @@ -1,3 +1,4 @@ +# pyre-unsafe """Basic types for building a reconstruction.""" from typing import Dict, Optional diff --git a/opensfm/undistort.py b/opensfm/undistort.py index 63bae4de6..f7e3f0803 100644 --- a/opensfm/undistort.py +++ b/opensfm/undistort.py @@ -1,3 +1,4 @@ +# pyre-unsafe import itertools import logging from typing import Iterator, List, Dict, Optional diff --git a/opensfm/unionfind.py b/opensfm/unionfind.py index bf0345bf5..aca3e8951 100644 --- a/opensfm/unionfind.py +++ b/opensfm/unionfind.py @@ -1,6 +1,8 @@ # Source: https://www.ics.uci.edu/~eppstein/PADS/UnionFind.py # Licence: MIT +# pyre-unsafe + # This is PADS, a library of Python Algorithms and Data Structures # implemented by David Eppstein of the University of California, Irvine. diff --git a/opensfm/upright.py b/opensfm/upright.py index bfa2a3df2..c06cc409a 100644 --- a/opensfm/upright.py +++ b/opensfm/upright.py @@ -1,3 +1,4 @@ +# pyre-unsafe import numpy as np from typing import Optional diff --git a/opensfm/video.py b/opensfm/video.py index a951240c2..9e34b6e92 100644 --- a/opensfm/video.py +++ b/opensfm/video.py @@ -1,3 +1,4 @@ +# pyre-unsafe import datetime import os from subprocess import Popen, PIPE diff --git a/opensfm/vlad.py b/opensfm/vlad.py index 5cf9b02b4..5c623e0f1 100644 --- a/opensfm/vlad.py +++ b/opensfm/vlad.py @@ -1,3 +1,4 @@ +# pyre-unsafe from functools import lru_cache from typing import List, Tuple, Iterable, Dict, Optional diff --git a/viewer/server.py b/viewer/server.py index 536c0fc2e..418791c79 100644 --- a/viewer/server.py +++ b/viewer/server.py @@ -1,3 +1,4 @@ +# pyre-unsafe import argparse import os from typing import List