From 5754612f9a3314c440785c33a84d161b2be14fcf Mon Sep 17 00:00:00 2001 From: Benjamin Wilson Date: Wed, 22 Mar 2023 13:05:04 -0400 Subject: [PATCH] Run autoflake. (#127) --- integration_tests/verify_tbv_download.py | 2 +- src/av2/evaluation/detection/eval.py | 3 --- src/av2/evaluation/scene_flow/make_mask_files.py | 1 - src/av2/evaluation/scene_flow/make_submission_archive.py | 5 +---- src/av2/map/map_api.py | 1 - src/av2/rendering/ops/draw.py | 2 +- src/av2/torch/structures/flow.py | 2 +- tests/evaluation/scene_flow/test_sf_submission_pipeline.py | 1 - tutorials/generate_forecasting_scenario_visualizations.py | 1 - 9 files changed, 4 insertions(+), 14 deletions(-) diff --git a/integration_tests/verify_tbv_download.py b/integration_tests/verify_tbv_download.py index 6fbf4983..e2fa0fea 100644 --- a/integration_tests/verify_tbv_download.py +++ b/integration_tests/verify_tbv_download.py @@ -5,7 +5,7 @@ import logging import sys from pathlib import Path -from typing import Final, List, Tuple +from typing import Final, Tuple import click from rich.progress import track diff --git a/src/av2/evaluation/detection/eval.py b/src/av2/evaluation/detection/eval.py index ee0391d9..13eb53c1 100644 --- a/src/av2/evaluation/detection/eval.py +++ b/src/av2/evaluation/detection/eval.py @@ -51,12 +51,9 @@ in addition to the mean statistics average across all classes, and P refers to the number of included statistics, e.g. AP, ATE, ASE, AOE, CDS by default. """ -import itertools import logging import multiprocessing as mp import warnings -from math import inf -from statistics import mean from typing import Dict, Final, List, Optional, Tuple import numpy as np diff --git a/src/av2/evaluation/scene_flow/make_mask_files.py b/src/av2/evaluation/scene_flow/make_mask_files.py index 8c9895ec..52ae88a5 100644 --- a/src/av2/evaluation/scene_flow/make_mask_files.py +++ b/src/av2/evaluation/scene_flow/make_mask_files.py @@ -2,7 +2,6 @@ import zipfile from pathlib import Path -from typing import BinaryIO import click import pandas as pd diff --git a/src/av2/evaluation/scene_flow/make_submission_archive.py b/src/av2/evaluation/scene_flow/make_submission_archive.py index 728003e4..23cbe253 100644 --- a/src/av2/evaluation/scene_flow/make_submission_archive.py +++ b/src/av2/evaluation/scene_flow/make_submission_archive.py @@ -1,7 +1,6 @@ """Validate and package a set of prediction files for submission to the leaderboard.""" -import json from pathlib import Path -from typing import Dict, Final +from typing import Final from zipfile import ZipFile import click @@ -9,8 +8,6 @@ import pandas as pd from rich.progress import track -import av2.evaluation.scene_flow.utils - SUBMISSION_COLUMNS: Final = ("flow_tx_m", "flow_ty_m", "flow_tz_m", "is_dynamic") diff --git a/src/av2/map/map_api.py b/src/av2/map/map_api.py index fb97b272..664732d5 100644 --- a/src/av2/map/map_api.py +++ b/src/av2/map/map_api.py @@ -20,7 +20,6 @@ from pathlib import Path from typing import Dict, Final, List, Optional, Tuple, Union -import fsspec import numpy as np from upath import UPath diff --git a/src/av2/rendering/ops/draw.py b/src/av2/rendering/ops/draw.py index c4ef9e08..7eaf8a29 100644 --- a/src/av2/rendering/ops/draw.py +++ b/src/av2/rendering/ops/draw.py @@ -9,7 +9,7 @@ import numpy as np from av2.utils.constants import NAN -from av2.utils.typing import NDArrayByte, NDArrayFloat, NDArrayInt, NDArrayNumber +from av2.utils.typing import NDArrayByte, NDArrayFloat, NDArrayInt UINT8_MAX: Final[np.uint8] = np.uint8(np.iinfo(np.uint8).max) UINT8_BITS: Final[np.uint8] = np.log2(UINT8_MAX + 1).astype(np.uint8) diff --git a/src/av2/torch/structures/flow.py b/src/av2/torch/structures/flow.py index af3883be..66a18848 100644 --- a/src/av2/torch/structures/flow.py +++ b/src/av2/torch/structures/flow.py @@ -3,7 +3,7 @@ from __future__ import annotations from dataclasses import dataclass -from typing import Dict, Final, List, Tuple +from typing import Dict, Final, Tuple import torch from kornia.geometry.linalg import transform_points diff --git a/tests/evaluation/scene_flow/test_sf_submission_pipeline.py b/tests/evaluation/scene_flow/test_sf_submission_pipeline.py index 4e5c9638..0080a654 100644 --- a/tests/evaluation/scene_flow/test_sf_submission_pipeline.py +++ b/tests/evaluation/scene_flow/test_sf_submission_pipeline.py @@ -5,7 +5,6 @@ import numpy as np -import av2.evaluation.scene_flow.constants import av2.evaluation.scene_flow.eval as eval from av2.evaluation.scene_flow.example_submission import example_submission from av2.evaluation.scene_flow.make_annotation_files import make_annotation_files diff --git a/tutorials/generate_forecasting_scenario_visualizations.py b/tutorials/generate_forecasting_scenario_visualizations.py index 06cbbba5..f2050954 100644 --- a/tutorials/generate_forecasting_scenario_visualizations.py +++ b/tutorials/generate_forecasting_scenario_visualizations.py @@ -7,7 +7,6 @@ from typing import Final import click -import numpy as np from joblib import Parallel, delayed from rich.progress import track