Update the flake8 pre-commit ignores (#2778)

* Remove additional ignores from flake8

* Remove all unused imports

* Remove all unused imports

* Update flake8 and pyupgrade

* F841, removed unused variables

* E731, removed lambda assignment to variables

* Remove E731, F403, F405, F524

* Remove E722, bare exceptions

* Remove E712, compare variable == True or == False to is True or is False

* Remove E402, module level import not at top of file

* Added --pre-file-ignores

* Add --per-file-ignores removing E741, E302 and E704

* Add E741, do not use variables named ‘l’, ‘O’, or ‘I’ to ignore issues in classic control

* Fixed issues for pytest==6.2

* Remove unnecessary # noqa

* Edit comment with the removal of E302

* Added warnings and declared module, attr for pyright type hinting

* Remove unused import

* Removed flake8 E302

* Updated flake8 from 3.9.2 to 4.0.1

* Remove unused variable
This commit is contained in:
Mark Towers
2022-04-26 16:18:37 +01:00
committed by GitHub
parent 4ecc2ad35a
commit bf093c6890
56 changed files with 94 additions and 148 deletions

View File

@@ -14,7 +14,6 @@ from gym.error import (
CustomSpaceError,
NoAsyncCallError,
)
from gym.logger import warn
from gym.vector.utils import (
CloudpickleWrapper,
clear_mpi_env_vars,
@@ -639,7 +638,7 @@ def _worker(index, env_fn, pipe, parent_pipe, shared_memory, error_queue):
while True:
command, data = pipe.recv()
if command == "reset":
if "return_info" in data and data["return_info"] == True:
if "return_info" in data and data["return_info"] is True:
observation, info = env.reset(**data)
pipe.send(((observation, info), True))
else:
@@ -703,7 +702,7 @@ def _worker_shared_memory(index, env_fn, pipe, parent_pipe, shared_memory, error
while True:
command, data = pipe.recv()
if command == "reset":
if "return_info" in data and data["return_info"] == True:
if "return_info" in data and data["return_info"] is True:
observation, info = env.reset(**data)
write_to_shared_memory(
observation_space, index, observation, shared_memory