From 6d83d4457d6aec341cd5cc357e7f43244a14a0be Mon Sep 17 00:00:00 2001 From: Arnaud Gelas Date: Thu, 14 Jan 2021 19:15:34 +0100 Subject: [PATCH] Fix pre-commit isort failure on tests/callbacks/*.py (#5428) * Remove tests.callbacks from skipped module in pyproject.toml * Fix pre-commit isort failure on tests/callbacks/*.py --- pyproject.toml | 5 +---- tests/callbacks/test_gpu_stats_monitor.py | 3 ++- tests/callbacks/test_progress_bar.py | 8 ++++---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9c9890bdc5..3e1b883932 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,16 +85,13 @@ skip_glob = [ "tests/base/*", - # todo - "tests/callbacks/*", - - # todo "tests/loggers/*", # todo "tests/tuner/*", + "tests/utilities/*", ] profile = "black" line_length = 120 diff --git a/tests/callbacks/test_gpu_stats_monitor.py b/tests/callbacks/test_gpu_stats_monitor.py index 56b6a0b771..ab9cc2efb0 100644 --- a/tests/callbacks/test_gpu_stats_monitor.py +++ b/tests/callbacks/test_gpu_stats_monitor.py @@ -12,9 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. import os + +import numpy as np import pytest import torch -import numpy as np from pytorch_lightning import Trainer from pytorch_lightning.callbacks import GPUStatsMonitor diff --git a/tests/callbacks/test_progress_bar.py b/tests/callbacks/test_progress_bar.py index 3c19748765..8840dae54a 100644 --- a/tests/callbacks/test_progress_bar.py +++ b/tests/callbacks/test_progress_bar.py @@ -12,15 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. import os -from unittest.mock import Mock, call +from unittest import mock +from unittest.mock import call, Mock import pytest -from unittest import mock from pytorch_lightning import Trainer -from pytorch_lightning.callbacks import ProgressBarBase, ProgressBar, ModelCheckpoint +from pytorch_lightning.callbacks import ModelCheckpoint, ProgressBar, ProgressBarBase from pytorch_lightning.utilities.exceptions import MisconfigurationException -from tests.base import EvalModelTemplate, BoringModel +from tests.base import BoringModel, EvalModelTemplate @pytest.mark.parametrize('callbacks,refresh_rate', [