diff --git a/arcade/gui/property.py b/arcade/gui/property.py index bc4a84bfc..e939a1bcd 100644 --- a/arcade/gui/property.py +++ b/arcade/gui/property.py @@ -10,7 +10,7 @@ class _Obs(Generic[P]): Internal holder for Property value and change listeners """ - __slots__ = "value", "listeners" + __slots__ = ("value", "listeners") def __init__(self, value: P): self.value = value @@ -26,7 +26,7 @@ class Property(Generic[P]): :param default_factory: A callable which returns the default value. Will be called with the property and the instance """ - __slots__ = "name", "default_factory", "obs" + __slots__ = ("name", "default_factory", "obs") name: str def __init__(self, default: Optional[P] = None, default_factory: Optional[Callable[[Any, Any], P]] = None): @@ -112,7 +112,13 @@ class MyObject: class _ObservableDict(dict): - # Internal class to observe changes inside a native python dict. + """Internal class to observe changes inside a native python dict.""" + + __slots__ = ( + "prop", + "obj" + ) + def __init__(self, prop: Property, instance, *largs): self.prop: Property = prop self.obj = ref(instance) @@ -167,7 +173,13 @@ def set(self, instance, value: dict): class _ObservableList(list): - # Internal class to observe changes inside a native python list. + """Internal class to observe changes inside a native python list.""" + + __slots__ = ( + "prop", + "obj" + ) + def __init__(self, prop: Property, instance, *largs): self.prop: Property = prop self.obj = ref(instance) diff --git a/arcade/paths.py b/arcade/paths.py index 6acd34987..f6b09fba1 100644 --- a/arcade/paths.py +++ b/arcade/paths.py @@ -74,7 +74,6 @@ class _AStarGraph(object): :param int bottom: Far bottom side y value :param int top: Far top side y value """ - def __init__(self, barriers: Union[List, Tuple, Set], left: int, right: int,