From d76c00721cee9e16a45a1e90d8929e280661814c Mon Sep 17 00:00:00 2001 From: Patrick Labatut Date: Tue, 8 Jun 2021 02:14:59 -0700 Subject: [PATCH] Remove explicit inheritance from object Summary: All classes implicitly inherit from `object` since Python 3, so remove unnecessary explicit inheritance. From the [official documentation](https://docs.python.org/3/library/functions.html#object): > `object` is a base for all classes. Reviewed By: nikhilaravi Differential Revision: D28942595 fbshipit-source-id: 466c0d19d8a93a6263e7ad734c3e87160cfa6066 --- projects/nerf/nerf/stats.py | 4 ++-- pytorch3d/structures/meshes.py | 2 +- pytorch3d/structures/pointclouds.py | 2 +- pytorch3d/structures/volumes.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/nerf/nerf/stats.py b/projects/nerf/nerf/stats.py index e2347ebc..183ce88f 100644 --- a/projects/nerf/nerf/stats.py +++ b/projects/nerf/nerf/stats.py @@ -11,7 +11,7 @@ from matplotlib import colors as mcolors from visdom import Visdom -class AverageMeter(object): +class AverageMeter: """ Computes and stores the average and current value. Tracks the exact history of the added values in every epoch. @@ -65,7 +65,7 @@ class AverageMeter(object): ] -class Stats(object): +class Stats: """ Stats logging object useful for gathering statistics of training a deep network in PyTorch. diff --git a/pytorch3d/structures/meshes.py b/pytorch3d/structures/meshes.py index 0033c2c3..38f75f5f 100644 --- a/pytorch3d/structures/meshes.py +++ b/pytorch3d/structures/meshes.py @@ -7,7 +7,7 @@ import torch from . import utils as struct_utils -class Meshes(object): +class Meshes: """ This class provides functions for working with batches of triangulated meshes with varying numbers of faces and vertices, and converting between diff --git a/pytorch3d/structures/pointclouds.py b/pytorch3d/structures/pointclouds.py index 929f6605..52de6192 100644 --- a/pytorch3d/structures/pointclouds.py +++ b/pytorch3d/structures/pointclouds.py @@ -5,7 +5,7 @@ import torch from . import utils as struct_utils -class Pointclouds(object): +class Pointclouds: """ This class provides functions for working with batches of 3d point clouds, and converting between representations. diff --git a/pytorch3d/structures/volumes.py b/pytorch3d/structures/volumes.py index 7e4e633c..010cb14b 100644 --- a/pytorch3d/structures/volumes.py +++ b/pytorch3d/structures/volumes.py @@ -8,7 +8,7 @@ from ..transforms import Scale, Transform3d from . import utils as struct_utils -class Volumes(object): +class Volumes: """ This class provides functions for working with batches of volumetric grids of possibly varying spatial sizes.