Skip to content

Commit

Permalink
Add deprecation warning to agent_selector
Browse files Browse the repository at this point in the history
  • Loading branch information
dm-ackerman committed Mar 21, 2024
1 parent f8e5e24 commit 3595dc2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pettingzoo/utils/agent_selector.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

from typing import Any
from warnings import warn


class AgentSelector:
Expand Down Expand Up @@ -61,3 +62,12 @@ def __eq__(self, other: AgentSelector) -> bool:
and self._current_agent == other._current_agent
and self.selected_agent == other.selected_agent
)


class agent_selector(AgentSelector):
def __init__(self, *args, **kwargs):
warn(
"agent_selector is deprecated, please use AgentSelector",
DeprecationWarning,
)
super().__init__(*args, **kwargs)

0 comments on commit 3595dc2

Please sign in to comment.