From a1b8d5e1413d267f526e0d80cfa1d55614d94e6d Mon Sep 17 00:00:00 2001 From: Rodrigo de Lazcano Date: Sat, 16 Sep 2023 11:40:48 -0400 Subject: [PATCH] Fix gen_envs_display.py in docs (#177) * remove version from file * pre-commit --------- Co-authored-by: rodrigodelazcano --- docs/_scripts/gen_envs_display.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/_scripts/gen_envs_display.py b/docs/_scripts/gen_envs_display.py index 762492e7..9904bfca 100644 --- a/docs/_scripts/gen_envs_display.py +++ b/docs/_scripts/gen_envs_display.py @@ -1,4 +1,5 @@ import os +import re import gymnasium as gym from tqdm import tqdm @@ -31,6 +32,9 @@ env_type = split_entrypoint[-1] env_name = split_entrypoint[-1] + # Remove file version from env_name + env_name = re.sub(r"(?:_v(?P\d+))", "", env_name) + if env_type not in filtered_envs_by_type: filtered_envs_by_type[env_type] = [env_name] elif env_name not in filtered_envs_by_type[env_type]: