From 517433f22a1d785d6fa4fcd6f7d709aff315b88a Mon Sep 17 00:00:00 2001 From: Peter Zhokhov Date: Fri, 8 Nov 2019 15:15:38 -0800 Subject: [PATCH] flake8 complaints --- .travis.yml | 2 +- baselines/bench/__init__.py | 4 ++-- baselines/common/mpi_adam_optimizer.py | 1 - baselines/deepq/__init__.py | 8 ++++---- baselines/run.py | 1 - 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index c68bfc152a..b8bccbb0a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,5 +10,5 @@ install: - docker build . -t baselines-test script: - - flake8 . --show-source --statistics + - flake8 . --show-source --statistics --exclude=baselines/her - docker run -e RUNSLOW=1 baselines-test pytest -v . diff --git a/baselines/bench/__init__.py b/baselines/bench/__init__.py index 4cbd5bba3d..ecfa5372c2 100644 --- a/baselines/bench/__init__.py +++ b/baselines/bench/__init__.py @@ -1,2 +1,2 @@ -from baselines.bench.benchmarks import * -from baselines.bench.monitor import * +from baselines.bench.benchmarks import * # noqa: F403 F401 +from baselines.bench.monitor import * # noqa: F403 F401 diff --git a/baselines/common/mpi_adam_optimizer.py b/baselines/common/mpi_adam_optimizer.py index da710ea6e2..04f3e5da64 100644 --- a/baselines/common/mpi_adam_optimizer.py +++ b/baselines/common/mpi_adam_optimizer.py @@ -1,6 +1,5 @@ import numpy as np import tensorflow as tf -from baselines.common.tests.test_with_mpi import with_mpi try: from mpi4py import MPI except ImportError: diff --git a/baselines/deepq/__init__.py b/baselines/deepq/__init__.py index 97fd1baee2..79140c2bc0 100644 --- a/baselines/deepq/__init__.py +++ b/baselines/deepq/__init__.py @@ -1,7 +1,7 @@ -from baselines.deepq import models # noqa -from baselines.deepq.deepq_learner import DEEPQ #noqa -from baselines.deepq.deepq import learn # noqa -from baselines.deepq.replay_buffer import ReplayBuffer, PrioritizedReplayBuffer # noqa +from baselines.deepq import models # noqa F401 +from baselines.deepq.deepq_learner import DEEPQ # noqa F401 +from baselines.deepq.deepq import learn # noqa F401 +from baselines.deepq.replay_buffer import ReplayBuffer, PrioritizedReplayBuffer # noqa F401 def wrap_atari_dqn(env): from baselines.common.atari_wrappers import wrap_deepmind diff --git a/baselines/run.py b/baselines/run.py index dc6230fbc3..4910290295 100644 --- a/baselines/run.py +++ b/baselines/run.py @@ -221,7 +221,6 @@ def main(args): obs = np.expand_dims(np.array(obs), axis=0) state = model.initial_state if hasattr(model, 'initial_state') else None - dones = np.zeros((1,)) episode_rew = 0 while True: