mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-30 01:50:19 +00:00
Rewriting of the registration mechanism (#2748)
* First version of the new registration * Almost done * Hopefully final commit * Minor fixes * Missing error * Type fixes * Type fixes * Add some type hinting stuff * Fix an error? * Fix literal import * Add a comment * Add some docstrings Remove old tests * Add some docstrings, rename helper functions * Rename a function * Registration check fix * Consistently use `register` instead of `envs.register` in tests * Fix the malformed registration error message to not use a write-only format * Change an error back to a warning when double-registering an environment
This commit is contained in:
committed by
GitHub
parent
0a5f543d6a
commit
00a60e6cc8
@@ -50,6 +50,6 @@ def should_skip_env_spec_for_tests(spec):
|
||||
|
||||
spec_list = [
|
||||
spec
|
||||
for spec in sorted(envs.registry.all(), key=lambda x: x.id)
|
||||
for spec in sorted(envs.registry.values(), key=lambda x: x.id)
|
||||
if spec.entry_point is not None and not should_skip_env_spec_for_tests(spec)
|
||||
]
|
||||
|
Reference in New Issue
Block a user