mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-12 18:13:35 +00:00
12 lines
306 B
Python
12 lines
306 B
Python
from __future__ import annotations
|
|
|
|
import gymnasium as gym
|
|
|
|
|
|
def has_wrapper(wrapped_env: gym.Env, wrapper_type: type) -> bool:
|
|
while isinstance(wrapped_env, gym.Wrapper):
|
|
if isinstance(wrapped_env, wrapper_type):
|
|
return True
|
|
wrapped_env = wrapped_env.env
|
|
return False
|