add example of use contextvar (#105)

This commit is contained in:
Jack Gerrits
2024-06-22 14:50:32 -04:00
committed by GitHub
parent 1d6dbc409b
commit 2d74fa9caf
5 changed files with 44 additions and 14 deletions

View File

@@ -12,6 +12,9 @@ class AgentId:
def __hash__(self) -> int:
return hash((self._namespace, self._name))
def __repr__(self) -> str:
return f"AgentId({self._name}, {self._namespace})"
def __eq__(self, value: object) -> bool:
if not isinstance(value, AgentId):
return False