@@ -289,28 +289,30 @@ std::vector<std::string> PyEnvPool<EnvPool>::py_action_keys =
289289 * It will register the envpool instance to the registry.
290290 * The static bool status is local to the translation unit.
291291 */
292- #define REGISTER (MODULE, SPEC, ENVPOOL ) \
293- py::class_<SPEC >(MODULE , " _" #SPEC , \
294- py::metaclass (py::module_::import (" abc" ).attr(" ABCMeta" ))) \
295- .def(py::init<const typename SPEC ::ConfigValues&>()) \
296- .def_readonly(" _config_values" , &SPEC ::py_config_values) \
297- .def_readonly(" _state_spec" , &SPEC ::py_state_spec) \
298- .def_readonly(" _action_spec" , &SPEC ::py_action_spec) \
299- .def_readonly_static(" _state_keys" , &SPEC ::py_state_keys) \
300- .def_readonly_static(" _action_keys" , &SPEC ::py_action_keys) \
301- .def_readonly_static(" _config_keys" , &SPEC ::py_config_keys) \
302- .def_readonly_static(" _default_config_values" , \
303- &SPEC ::py_default_config_values); \
304- py::class_<ENVPOOL >( \
305- MODULE , " _" #ENVPOOL , \
306- py::metaclass (py::module_::import (" abc" ).attr(" ABCMeta" ))) \
307- .def(py::init<const SPEC &>()) \
308- .def_readonly(" _spec" , &ENVPOOL ::py_spec) \
309- .def(" _recv" , &ENVPOOL ::PyRecv) \
310- .def(" _send" , &ENVPOOL ::PySend) \
311- .def(" _reset" , &ENVPOOL ::PyReset) \
312- .def_readonly_static(" _state_keys" , &ENVPOOL ::py_state_keys) \
313- .def_readonly_static(" _action_keys" , &ENVPOOL ::py_action_keys) \
292+ // clang-format off
293+ #define REGISTER (MODULE, SPEC, ENVPOOL ) \
294+ py::class_<SPEC >(MODULE , " _" #SPEC , \
295+ py::metaclass (py::module_::import (" abc" ).attr(" ABCMeta" ))) \
296+ .def(py::init<const typename SPEC ::ConfigValues&>()) \
297+ .def_readonly(" _config_values" , &SPEC ::py_config_values) \
298+ .def_readonly(" _state_spec" , &SPEC ::py_state_spec) \
299+ .def_readonly(" _action_spec" , &SPEC ::py_action_spec) \
300+ .def_readonly_static(" _state_keys" , &SPEC ::py_state_keys) \
301+ .def_readonly_static(" _action_keys" , &SPEC ::py_action_keys) \
302+ .def_readonly_static(" _config_keys" , &SPEC ::py_config_keys) \
303+ .def_readonly_static(" _default_config_values" , \
304+ &SPEC ::py_default_config_values); \
305+ py::class_<ENVPOOL >( \
306+ MODULE , " _" #ENVPOOL , \
307+ py::metaclass (py::module_::import (" abc" ).attr(" ABCMeta" ))) \
308+ .def(py::init<const SPEC &>()) \
309+ .def_readonly(" _spec" , &ENVPOOL ::py_spec) \
310+ .def(" _recv" , &ENVPOOL ::PyRecv) \
311+ .def(" _send" , &ENVPOOL ::PySend) \
312+ .def(" _reset" , &ENVPOOL ::PyReset) \
313+ .def_readonly_static(" _state_keys" , &ENVPOOL ::py_state_keys) \
314+ .def_readonly_static(" _action_keys" , &ENVPOOL ::py_action_keys) \
314315 .def(" _xla" , &ENVPOOL ::Xla);
316+ // clang-format on
315317
316318#endif // ENVPOOL_CORE_PY_ENVPOOL_H_
0 commit comments