From 2017f3ed9ef3cc5572cb3b5b5225367dfe56b38f Mon Sep 17 00:00:00 2001 From: KexianShen Date: Thu, 30 Jun 2022 23:00:47 +0800 Subject: [PATCH] Fix the initialization of render mode set (#2938) --- gym/utils/renderer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gym/utils/renderer.py b/gym/utils/renderer.py index cbf68579c..d0a31a4dc 100644 --- a/gym/utils/renderer.py +++ b/gym/utils/renderer.py @@ -54,9 +54,9 @@ class Renderer: This method should be usually called inside environment's step and reset method. """ - if self.mode is not None and self.mode not in SINGLE_RENDER: + if self.mode is not None and self.mode not in self.single_render: render_return = self.render(self.mode) - if self.mode not in NO_RETURNS_RENDER: + if self.mode not in self.no_returns_render: self.render_list.append(render_return) def get_renders(self) -> Optional[List]: @@ -64,9 +64,9 @@ class Renderer: This method should be usually called in the environment's render method to retrieve the frames collected till this time step. """ - if self.mode in SINGLE_RENDER: + if self.mode in self.single_render: return self.render(self.mode) - elif self.mode is not None and self.mode not in NO_RETURNS_RENDER: + elif self.mode is not None and self.mode not in self.no_returns_render: renders = self.render_list self.render_list = [] return renders