-
Notifications
You must be signed in to change notification settings - Fork 293
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Type definitions like
| PolicyLoaderFn = Callable[..., policies.BasePolicy] |
can (and should be, for better type safety) replaced with the usage of Protocol + ParamSpec.
Example:
from typing import ParamSpec, Protocol
P = ParamSpec("P")
class PolicyLoaderFn(Protocol[P]):
def __call__(self, venv: vec_env.VecEnv, *args: P.args, **kwargs: P.kwargs) -> policies.BasePolicy:
...Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request