Skip to content

Commit

Permalink
Del (object) from 50 inc manifold/cogwheel/lib/manifold_semaphore.py
Browse files Browse the repository at this point in the history
Summary: Python3 makes the use of `(object)` in class inheritance unnecessary. Let's modernize our code by eliminating this.

Reviewed By: palmje

Differential Revision: D48718310

fbshipit-source-id: c6e6ad2889add16537c78353f3202ac924f00fae
  • Loading branch information
r-barnes authored and facebook-github-bot committed Aug 28, 2023
1 parent 193818d commit 899575a
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion opensfm/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ def undistorted_dataset(self) -> "UndistortedDataSet":
)


class UndistortedDataSet(object):
class UndistortedDataSet:
"""Accessors to the undistorted data of a dataset.
Data include undistorted images, masks, and segmentation as well
Expand Down
2 changes: 1 addition & 1 deletion opensfm/feature_loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
)


class FeatureLoader(object):
class FeatureLoader:
def clear_cache(self) -> None:
self.load_mask.cache_clear()
self.load_points_colors_segmentations_instances.cache_clear()
Expand Down
2 changes: 1 addition & 1 deletion opensfm/features_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def is_high_res_panorama(
return w == 2 * h or exif_pano


class Counter(object):
class Counter:
"""Lock-less counter from https://julien.danjou.info/atomic-lock-free-counters-in-python/
that relies on the CPython impl. of itertools.count() that is thread-safe. Used, as for
some reason, joblib doesn't like a good old threading.Lock (everything is stuck)
Expand Down
2 changes: 1 addition & 1 deletion opensfm/geo.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def gps_distance(latlon_1, latlon_2):
return dis


class TopocentricConverter(object):
class TopocentricConverter:
"""Convert to and from a topocentric reference frame."""

def __init__(self, reflat, reflon, refalt):
Expand Down
2 changes: 1 addition & 1 deletion opensfm/synthetic_data/synthetic_scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def normalized(x: np.ndarray) -> np.ndarray:
return pose


class SyntheticScene(object):
class SyntheticScene:
def get_reconstruction(self) -> types.Reconstruction:
raise NotImplementedError()

Expand Down
4 changes: 2 additions & 2 deletions opensfm/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
PANOSHOT_RIG_PREFIX = "panoshot_"


class ShotMesh(object):
class ShotMesh:
"""Triangular mesh of points visible in a shot
Attributes:
Expand All @@ -22,7 +22,7 @@ def __init__(self):
self.faces = None


class Reconstruction(object):
class Reconstruction:
"""Defines the reconstructed scene.
Attributes:
Expand Down
2 changes: 1 addition & 1 deletion opensfm/vlad.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def vlad_distances(
return image, distances, others


class VladCache(object):
class VladCache:
def clear_cache(self) -> None:
self.load_words.cache_clear()
self.vlad_histogram.cache_clear()
Expand Down

0 comments on commit 899575a

Please sign in to comment.