Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed May 12, 2020
1 parent 320576c commit 15bebf1
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion pytorch_lightning/core/model_saving.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
rank_zero_warn("`model_saving` module has been renamed to `saving` since v0.6.0."
" The deprecated module name will be removed in v0.8.0.", DeprecationWarning)

from pytorch_lightning.core.saving import * # noqa: F403
from pytorch_lightning.core.saving import * # noqa: F403 E402
2 changes: 1 addition & 1 deletion pytorch_lightning/core/root_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
rank_zero_warn("`root_module` module has been renamed to `lightning` since v0.6.0."
" The deprecated module name will be removed in v0.8.0.", DeprecationWarning)

from pytorch_lightning.core.lightning import * # noqa: F403
from pytorch_lightning.core.lightning import * # noqa: F403 E402
2 changes: 1 addition & 1 deletion pytorch_lightning/logging/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
rank_zero_warn("`logging` package has been renamed to `loggers` since v0.7.0"
" The deprecated package name will be removed in v0.9.0.", DeprecationWarning)

from pytorch_lightning.loggers import * # noqa: F403
from pytorch_lightning.loggers import * # noqa: F403 E402
2 changes: 1 addition & 1 deletion pytorch_lightning/logging/comet.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
rank_zero_warn("`logging.comet` module has been renamed to `loggers.comet` since v0.7.0."
" The deprecated module name will be removed in v0.9.0.", DeprecationWarning)

from pytorch_lightning.loggers.comet import CometLogger # noqa: F403
from pytorch_lightning.loggers.comet import CometLogger # noqa: F403 E402
2 changes: 1 addition & 1 deletion pytorch_lightning/logging/mlflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
rank_zero_warn("`logging.mlflow` module has been renamed to `loggers.mlflow` since v0.7.0."
" The deprecated module name will be removed in v0.9.0.", DeprecationWarning)

from pytorch_lightning.loggers.mlflow import MLFlowLogger # noqa: F403
from pytorch_lightning.loggers.mlflow import MLFlowLogger # noqa: F403 E402
2 changes: 1 addition & 1 deletion pytorch_lightning/logging/neptune.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
rank_zero_warn("`logging.neptune` module has been renamed to `loggers.neptune` since v0.7.0."
" The deprecated module name will be removed in v0.9.0.", DeprecationWarning)

from pytorch_lightning.loggers.neptune import NeptuneLogger # noqa: F403
from pytorch_lightning.loggers.neptune import NeptuneLogger # noqa: F403 E402
2 changes: 1 addition & 1 deletion pytorch_lightning/logging/test_tube.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
rank_zero_warn("`logging.test_tube` module has been renamed to `loggers.test_tube` since v0.7.0."
" The deprecated module name will be removed in v0.9.0.", DeprecationWarning)

from pytorch_lightning.loggers.test_tube import TestTubeLogger # noqa: F403
from pytorch_lightning.loggers.test_tube import TestTubeLogger # noqa: F403 E402
2 changes: 1 addition & 1 deletion pytorch_lightning/logging/wandb.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
rank_zero_warn("`logging.wandb` module has been renamed to `loggers.wandb` since v0.7.0."
" The deprecated module name will be removed in v0.9.0.", DeprecationWarning)

from pytorch_lightning.loggers.wandb import WandbLogger # noqa: F403
from pytorch_lightning.loggers.wandb import WandbLogger # noqa: F403 E402
2 changes: 1 addition & 1 deletion pytorch_lightning/pt_overrides/override_data_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
rank_zero_warn("`override_data_parallel` module has been renamed to `data_parallel` since v0.6.0."
" The deprecated module name will be removed in v0.8.0.", DeprecationWarning)

from pytorch_lightning.overrides.data_parallel import ( # noqa: F402
from pytorch_lightning.overrides.data_parallel import ( # noqa: F402 E402
get_a_var, parallel_apply, LightningDataParallel, LightningDistributedDataParallel)
2 changes: 1 addition & 1 deletion pytorch_lightning/root_module/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
rank_zero_warn("`root_module.decorators` module has been renamed to `core.decorators` since v0.6.0."
" The deprecated module name will be removed in v0.8.0.", DeprecationWarning)

from pytorch_lightning.core.decorators import * # noqa: F403
from pytorch_lightning.core.decorators import * # noqa: F403 E402
2 changes: 1 addition & 1 deletion pytorch_lightning/root_module/grads.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
rank_zero_warn("`root_module.grads` module has been renamed to `core.grads` since v0.6.0."
" The deprecated module name will be removed in v0.8.0.", DeprecationWarning)

from pytorch_lightning.core.grads import * # noqa: F403
from pytorch_lightning.core.grads import * # noqa: F403 E402
2 changes: 1 addition & 1 deletion pytorch_lightning/root_module/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
rank_zero_warn("`root_module.hooks` module has been renamed to `core.hooks` since v0.6.0."
" The deprecated module name will be removed in v0.8.0.", DeprecationWarning)

from pytorch_lightning.core.hooks import * # noqa: F403
from pytorch_lightning.core.hooks import * # noqa: F403 E402
2 changes: 1 addition & 1 deletion pytorch_lightning/root_module/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
rank_zero_warn("`root_module.memory` module has been renamed to `core.memory` since v0.6.0."
" The deprecated module name will be removed in v0.8.0.", DeprecationWarning)

from pytorch_lightning.core.memory import * # noqa: F403
from pytorch_lightning.core.memory import * # noqa: F403 E402
2 changes: 1 addition & 1 deletion pytorch_lightning/root_module/model_saving.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
rank_zero_warn("`root_module.model_saving` module has been renamed to `core.saving` since v0.6.0."
" The deprecated module name will be removed in v0.8.0.", DeprecationWarning)

from pytorch_lightning.core.saving import * # noqa: F403
from pytorch_lightning.core.saving import * # noqa: F403 E402
2 changes: 1 addition & 1 deletion pytorch_lightning/root_module/root_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
rank_zero_warn("`root_module.root_module` module has been renamed to `core.lightning` since v0.6.0."
" The deprecated module name will be removed in v0.8.0.", DeprecationWarning)

from pytorch_lightning.core.lightning import * # noqa: F403
from pytorch_lightning.core.lightning import * # noqa: F403 E402
2 changes: 1 addition & 1 deletion pytorch_lightning/trainer/optimizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def configure_schedulers(self, schedulers: list):
for scheduler in schedulers:
if isinstance(scheduler, dict):
if 'scheduler' not in scheduler:
raise ValueError(f'Lr scheduler should have key `scheduler`',
raise ValueError('Lr scheduler should have key `scheduler`',
' with item being a lr scheduler')
scheduler['reduce_on_plateau'] = isinstance(
scheduler['scheduler'], optim.lr_scheduler.ReduceLROnPlateau)
Expand Down
2 changes: 1 addition & 1 deletion pytorch_lightning/trainer/training_tricks.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def scale_batch_size(self,
raise MisconfigurationException(f'Field {batch_arg_name} not found in `model.hparams`')

if hasattr(model.train_dataloader, 'patch_loader_code'):
raise MisconfigurationException(f'The batch scaling feature cannot be used with dataloaders'
raise MisconfigurationException('The batch scaling feature cannot be used with dataloaders'
' passed directly to `.fit()`. Please disable the feature or'
' incorporate the dataloader into the model.')

Expand Down
2 changes: 1 addition & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ codecov
pytest>=3.0.5
pytest-cov
pytest-flake8
flake8<3.8
flake8
check-manifest
twine==1.13.0

0 comments on commit 15bebf1

Please sign in to comment.