Updates the make and registration functions with better parameters and hints (#3041)

* Initial commit

* Add missing __init__ for EnvSpec

* third time a charm

* Replace entry_point=None with entry_point="no-entry-point"

* Readd make overloads, updated with all gym envs

* pre-commit

* Add apply_step_compatibility to make and add testing

* Code review by Arjun
This commit is contained in:
Mark Towers
2022-09-01 16:02:31 +01:00
committed by GitHub
parent 799c8d20c1
commit 0bcd49ec10
6 changed files with 138 additions and 566 deletions

View File

@@ -48,7 +48,7 @@ class GenericTestEnv(gym.Env):
render_fn: callable = basic_render_fn,
metadata: Optional[Dict[str, Any]] = None,
render_mode: Optional[str] = None,
spec: EnvSpec = EnvSpec("TestingEnv-v0"),
spec: EnvSpec = EnvSpec("TestingEnv-v0", "testing-env-no-entry-point"),
):
self.metadata = {} if metadata is None else metadata
self.render_mode = render_mode