Skip to content

Commit

Permalink
type hinting again
Browse files Browse the repository at this point in the history
  • Loading branch information
reginald-mclean committed Aug 30, 2024
1 parent 19f2062 commit 99ba23a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions metaworld/wrappers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, List, Optional
from typing import Any, Dict, List, Optional

import gymnasium as gym
import numpy as np
Expand Down Expand Up @@ -60,14 +60,14 @@ def toggle_sample_tasks_on_reset(self, on: bool):
self.sample_tasks_on_reset = on

def reset(
self, *, seed: Optional[int] = None, options: Optional[dict[str, Any]] = None
self, *, seed: Optional[int] = None, options: Optional[Dict[str, Any]] = None
):
if self.sample_tasks_on_reset:
self._set_random_task()
return self.env.reset(seed=seed, options=options)

def sample_tasks(
self, *, seed: Optional[int] = None, options: Optional[dict[str, Any]] = None
self, *, seed: Optional[int] = None, options: Optional[Dict[str, Any]] = None
):
self._set_random_task()
return self.env.reset(seed=seed, options=options)
Expand Down Expand Up @@ -110,14 +110,14 @@ def __init__(
np.random.seed(seed)

def reset(
self, *, seed: Optional[int] = None, options: Optional[dict[str, Any]] = None
self, *, seed: Optional[int] = None, options: Optional[Dict[str, Any]] = None
):
if self.sample_tasks_on_reset:
self._set_pseudo_random_task()
return self.env.reset(seed=seed, options=options)

def sample_tasks(
self, *, seed: Optional[int] = None, options: Optional[dict[str, Any]] = None
self, *, seed: Optional[int] = None, options: Optional[Dict[str, Any]] = None
):
self._set_pseudo_random_task()
return self.env.reset(seed=seed, options=options)
Expand Down

0 comments on commit 99ba23a

Please sign in to comment.