Skip to content

Commit 3f8bd57

Browse files
author
Benjamin Gorman
committed
Reenable and fix flake8 unused import errors
F401 '{}' imported but unused
1 parent 9134a77 commit 3f8bd57

File tree

15 files changed

+7
-22
lines changed

15 files changed

+7
-22
lines changed

monai/apps/datasets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# See the License for the specific language governing permissions and
1010
# limitations under the License.
1111

12-
from typing import Any, Callable
12+
from typing import Callable
1313

1414
import os
1515
import sys

monai/engines/workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import torch
1919
from torch.utils.data import DataLoader
2020

21-
from monai.transforms import apply_transform, Transform
21+
from monai.transforms import apply_transform
2222
from monai.utils import exact_version, optional_import, ensure_tuple
2323
from monai.engines.utils import default_prepare_batch
2424

monai/metrics/rocauc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# See the License for the specific language governing permissions and
1010
# limitations under the License.
1111

12-
from typing import Optional, Union
12+
from typing import Union
1313

1414
import warnings
1515

monai/networks/blocks/aspp.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
# See the License for the specific language governing permissions and
1010
# limitations under the License.
1111

12-
from typing import Sequence, Tuple
13-
1412
import torch
1513
import torch.nn as nn
1614

monai/networks/blocks/convolutions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
# See the License for the specific language governing permissions and
1010
# limitations under the License.
1111

12-
from typing import Tuple, Union
13-
1412
import numpy as np
1513
import torch.nn as nn
1614

monai/networks/nets/densenet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# limitations under the License.
1111

1212
from collections import OrderedDict
13-
from typing import Callable, Sequence, Tuple
13+
from typing import Callable, Sequence
1414

1515
import torch
1616
import torch.nn as nn

monai/networks/nets/unet.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
# See the License for the specific language governing permissions and
1010
# limitations under the License.
1111

12-
from typing import Union
13-
1412
import torch.nn as nn
1513

1614
from monai.networks.blocks.convolutions import Convolution, ResidualUnit

monai/transforms/croppad/array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from monai.data.utils import get_random_patch, get_valid_patch_size
2222
from monai.transforms.compose import Randomizable, Transform
2323
from monai.transforms.utils import generate_pos_neg_label_crop_centers, generate_spatial_bounding_box
24-
from monai.utils import ensure_tuple, ensure_tuple_rep, fall_back_tuple, NumpyPadMode, Method
24+
from monai.utils import ensure_tuple, fall_back_tuple, NumpyPadMode, Method
2525

2626

2727
class SpatialPad(Transform):

monai/transforms/spatial/array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
https://github.com/Project-MONAI/MONAI/wiki/MONAI_Design
1414
"""
1515

16-
from typing import Iterable, List, Optional, Sequence, Tuple, Union
16+
from typing import List, Optional, Sequence, Tuple, Union
1717

1818
import warnings
1919

monai/transforms/spatial/dictionary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
Class names are ended with 'd' to denote dictionary-based transforms.
1616
"""
1717

18-
from typing import Iterable, Optional, Sequence, Tuple, Union
18+
from typing import Optional, Sequence, Tuple, Union
1919

2020
import numpy as np
2121
import torch

setup.cfg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ ignore =
5353
# commits. Can not enable until all outstanding typehint
5454
# PR's are approved
5555
T484
56-
# Unused imports may be used later, disable warning while we
57-
# separate many PR's
58-
F401
5956
# ^^^^^^^^^ Temporary disabling to allow smaller PRs
6057
per-file-ignores = __init__.py: F401
6158
exclude = *.pyi,.git,monai/_version.py,versioneer.py,venv, _version.py

tests/test_concat_itemsd.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
# limitations under the License.
1111

1212
import unittest
13-
import time
14-
import sys
1513
import torch
1614
import numpy as np
1715
from monai.transforms import ConcatItemsd

tests/test_copy_itemsd.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
# limitations under the License.
1111

1212
import unittest
13-
import time
14-
import sys
1513
import torch
1614
import numpy as np
1715
from parameterized import parameterized

tests/test_download_and_extract.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import unittest
1313
import os
1414
import shutil
15-
import numpy as np
1615
import tempfile
1716
from monai.apps import download_and_extract, download_url, extractall
1817
from tests.utils import skip_if_quick

tests/test_simulatedelayd.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from parameterized import parameterized
1616
from monai.transforms.utility.dictionary import SimulateDelayd
1717
from tests.utils import NumpyImageTestCase2D
18-
from monai.config import KeysCollection
1918

2019

2120
class TestSimulateDelay(NumpyImageTestCase2D):

0 commit comments

Comments
 (0)