From 32ad407ea8f09af00624fc09fa9812d558e38c2a Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Mon, 16 Sep 2024 20:25:23 +0000 Subject: [PATCH] Reenable pytype attribute errors in env Pytype complains that attribute errors are not reenabled after a temporary disable. This patch fixes that be reenabling them so that it stops throwing the warning while also potentially improving coverage of the code if more is added in the future. --- compiler_opt/rl/env.py | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler_opt/rl/env.py b/compiler_opt/rl/env.py index 1bd96afb..904fd388 100644 --- a/compiler_opt/rl/env.py +++ b/compiler_opt/rl/env.py @@ -359,6 +359,7 @@ def reset(self, module: corpus.LoadedModuleSpec): self._clang_generator.send(None) # pytype: disable=attribute-error self._iclang, self._clang = self._clang_generator.send(module) + # pytype: enable=attribute-error return self._get_observation() def step(self, action: np.ndarray):