Skip to content

Commit

Permalink
typing fix
Browse files Browse the repository at this point in the history
  • Loading branch information
quaquel committed Sep 22, 2024
1 parent 5222518 commit 29974b2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mesa/experimental/signals/signal.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Core classes for Observables."""

from __future__ import annotations

import contextlib
import functools
import itertools
Expand All @@ -9,9 +11,9 @@
from collections.abc import Callable
from typing import Any

__all__ = ["Observable", "HasObservables"]
__all__ = ["Observable", "HasObservables", "All", "Computable"]

CURRENT_COMPUTED: "Computed" | None = None # the current Computed that is evaluating
CURRENT_COMPUTED: Computed | None = None # the current Computed that is evaluating


class BaseObservable(ABC):
Expand Down Expand Up @@ -245,7 +247,7 @@ def __deepcopy__(self, memo):
class HasObservables:
"""HasObservables class."""

observables: dict[str, Observable] = {}
observables: dict[str, BaseObservable] = {}
subscribers: dict[str, dict[str, weakref.WeakSet]]

def __new__(cls, *args, **kwargs): # noqa D102
Expand Down

0 comments on commit 29974b2

Please sign in to comment.