|
7 | 7 |
|
8 | 8 | from typing import ( |
9 | 9 | List, Callable, Any, Dict, |
10 | | - Optional, TypeVar, Generic, Union |
| 10 | + Optional, TypeVar, Union |
11 | 11 | ) |
12 | | -from abc import ABC, abstractmethod |
13 | | -from contextlib import contextmanager |
14 | 12 | import asyncio |
15 | 13 | import weakref |
16 | 14 | import logging |
17 | 15 | from enum import Enum |
| 16 | + |
18 | 17 | from fletx.core.di import DI |
19 | 18 | from fletx.core.effects import EffectManager |
20 | 19 | from fletx.core.state import ( |
21 | 20 | Reactive, RxInt, RxStr, RxBool, RxList, RxDict, |
22 | | - Computed, Observer, ReactiveDependencyTracker |
| 21 | + Computed, Observer, # ReactiveDependencyTracker |
23 | 22 | ) |
24 | 23 | from fletx.utils import get_logger, get_event_loop |
25 | 24 |
|
@@ -54,7 +53,7 @@ def __init__( |
54 | 53 | self.type = type |
55 | 54 | self.data = data |
56 | 55 | self.source = source |
57 | | - self.timestamp = get_event_loop().time() |
| 56 | + # self.timestamp = get_event_loop().time() |
58 | 57 |
|
59 | 58 |
|
60 | 59 | #### |
@@ -368,7 +367,7 @@ def _on_state_change(self): |
368 | 367 | self._is_ready.value = current_state == ControllerState.READY |
369 | 368 |
|
370 | 369 | # Emit appropiated events |
371 | | - self.emit_local(f"state_changed", current_state) |
| 370 | + self.emit_local("state_changed", current_state) |
372 | 371 |
|
373 | 372 | # Call the appropriate lifecycle hook |
374 | 373 | # Controller is initialized |
@@ -536,7 +535,7 @@ def emit_local(self, event_type: str, data: Any = None): |
536 | 535 | self._event_bus.emit(event_type, data) |
537 | 536 |
|
538 | 537 | def emit_global(self, event_type: str, data: Any = None): |
539 | | - """Émit an event globally (reactive)""" |
| 538 | + """Emit an event globally (reactive)""" |
540 | 539 |
|
541 | 540 | self._check_not_disposed() |
542 | 541 | self._global_event_bus.emit(event_type, data) |
@@ -665,7 +664,7 @@ def listen_context( |
665 | 664 | self, |
666 | 665 | callback: Callable[[], None] |
667 | 666 | ) -> Observer: |
668 | | - """Listen changes withn local context""" |
| 667 | + """Listen changes within local context""" |
669 | 668 |
|
670 | 669 | self._check_not_disposed() |
671 | 670 | return self._context.listen(callback) |
|
0 commit comments