Move events module to watch
MODIFY
plextraktsync/commands/watch.py
plextraktsync/commands/watch.py
from __future__ import annotations
-from plextraktsync.events import (ActivityNotification, Error,
- PlaySessionStateNotification, TimelineEntry)
from plextraktsync.factory import factory
+from plextraktsync.watch.events import (ActivityNotification, Error,
+ PlaySessionStateNotification,
+ TimelineEntry)
def watch(server: str):

MODIFY
plextraktsync/watch/EventDispatcher.py
plextraktsync/watch/EventDispatcher.py
-from plextraktsync.events import Error
from plextraktsync.factory import logging
from plextraktsync.watch.EventFactory import EventFactory
+from plextraktsync.watch.events import Error
class EventDispatcher:

MODIFY
plextraktsync/watch/WatchStateUpdater.py
plextraktsync/watch/WatchStateUpdater.py
from typing import TYPE_CHECKING
from plextraktsync.decorators.cached_property import cached_property
-from plextraktsync.events import (ActivityNotification, Error,
- PlaySessionStateNotification, TimelineEntry)
from plextraktsync.factory import logging
+from plextraktsync.watch.events import (ActivityNotification, Error,
+ PlaySessionStateNotification,
+ TimelineEntry)
if TYPE_CHECKING:
from plextraktsync.config.Config import Config

MODIFY
plextraktsync/watch/WebSocketListener.py
plextraktsync/watch/WebSocketListener.py
from time import sleep
from typing import TYPE_CHECKING
-from plextraktsync.events import Error
from plextraktsync.factory import logging
from plextraktsync.watch.EventDispatcher import EventDispatcher
+from plextraktsync.watch.events import Error
if TYPE_CHECKING:
from plexapi.server import PlexServer

RENAME
plextraktsync/events.py
plextraktsync/watch/events.py
MODIFY
tests/test_events.py
tests/test_events.py
#!/usr/bin/env python3 -m pytest
-from plextraktsync.events import ActivityNotification
from plextraktsync.watch.EventDispatcher import EventDispatcher
from plextraktsync.watch.EventFactory import EventFactory
+from plextraktsync.watch.events import ActivityNotification
from tests.conftest import load_mock

Move events module to watch