Skip to content

Commit

Permalink
Remove unnecessary change
Browse files Browse the repository at this point in the history
  • Loading branch information
takuseno committed Nov 3, 2024
1 parent 2c74ce9 commit 03888be
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions d3rlpy/types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Sequence, Type, TypeVar, Union
from typing import Any, Sequence, Union

import gym
import gymnasium
Expand All @@ -20,7 +20,6 @@
"TorchObservation",
"GymEnv",
"OptimizerWrapperProto",
"assert_cast",
]


Expand All @@ -43,11 +42,3 @@ class OptimizerWrapperProto(Protocol):
@property
def optim(self) -> Optimizer:
raise NotImplementedError


T = TypeVar("T")


def assert_cast(obj_type: Type[T], obj: Any) -> T:
assert isinstance(obj, obj_type)
return obj

0 comments on commit 03888be

Please sign in to comment.