Skip to content

Commit

Permalink
Reenable pytype attribute errors in env
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
boomanaiden154 committed Sep 16, 2024
1 parent ff7448c commit ce6a42c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler_opt/rl/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit ce6a42c

Please sign in to comment.