Skip to content

Commit

Permalink
fix(imports): consolidate imports from chaturbate_poller in example s…
Browse files Browse the repository at this point in the history
…cripts (#140)
  • Loading branch information
MountainGod2 authored Dec 12, 2024
1 parent cfb2760 commit 454f089
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 12 deletions.
3 changes: 1 addition & 2 deletions examples/event_handler_large_tips.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import asyncio

from chaturbate_poller.chaturbate_client import ChaturbateClient
from chaturbate_poller.config_manager import ConfigManager
from chaturbate_poller import ChaturbateClient, ConfigManager

LARGE_TIP_THRESHOLD = 100 # Set the threshold for large tips

Expand Down
4 changes: 1 addition & 3 deletions examples/formatted_event_messages.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import asyncio

from chaturbate_poller.chaturbate_client import ChaturbateClient
from chaturbate_poller.config_manager import ConfigManager
from chaturbate_poller.format_messages import format_message
from chaturbate_poller import ChaturbateClient, ConfigManager, format_message

config_manager = ConfigManager()
username = config_manager.get("CB_USERNAME", "")
Expand Down
3 changes: 1 addition & 2 deletions examples/poll_and_log_events.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import asyncio
import logging

from chaturbate_poller.chaturbate_client import ChaturbateClient
from chaturbate_poller.config_manager import ConfigManager
from chaturbate_poller import ChaturbateClient, ConfigManager

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
Expand Down
3 changes: 1 addition & 2 deletions examples/simple_poller.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import asyncio

from chaturbate_poller.chaturbate_client import ChaturbateClient
from chaturbate_poller.config_manager import ConfigManager
from chaturbate_poller import ChaturbateClient, ConfigManager

config_manager = ConfigManager()
username = config_manager.get("CB_USERNAME", "")
Expand Down
6 changes: 3 additions & 3 deletions src/chaturbate_poller/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"""chaturbate_poller package."""

# Read version from installed package
from importlib.metadata import version

from chaturbate_poller.chaturbate_client import ChaturbateClient
from chaturbate_poller.config_manager import ConfigManager
from chaturbate_poller.format_messages import format_message

__version__ = version("chaturbate_poller")
__author__ = "MountainGod2"
Expand All @@ -15,5 +16,4 @@
__description__ = "Python library for interacting with the Chaturbate Events API."


__all__ = ["ChaturbateClient"]
"""List[str]: The package exports."""
__all__: list[str] = ["ChaturbateClient", "ConfigManager", "format_message"]

0 comments on commit 454f089

Please sign in to comment.