From eefcdbe43a1b82e3f94d1bf49a1b0a2e6bf7a723 Mon Sep 17 00:00:00 2001 From: extreme4all <40169115+extreme4all@users.noreply.github.com> Date: Sun, 27 Oct 2024 00:40:09 +0200 Subject: [PATCH] change dir name --- osrs/__init__.py | 4 ++++ osrs/async_api/osrs/hiscores.py | 6 +++--- osrs/utils/__init__.py | 2 +- tests/test_async_hiscore.py | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/osrs/__init__.py b/osrs/__init__.py index e69de29..0bdce72 100644 --- a/osrs/__init__.py +++ b/osrs/__init__.py @@ -0,0 +1,4 @@ +from osrs.async_api.osrs.hiscores import Hiscore +from osrs.utils import RateLimiter + +__all__ = ["Hiscore", "RateLimiter"] diff --git a/osrs/async_api/osrs/hiscores.py b/osrs/async_api/osrs/hiscores.py index aadf2be..e7bc9c5 100644 --- a/osrs/async_api/osrs/hiscores.py +++ b/osrs/async_api/osrs/hiscores.py @@ -4,8 +4,8 @@ from aiohttp import ClientSession from pydantic import BaseModel -from src.exceptions import PlayerDoesNotExist, Undefined, UnexpectedRedirection -from src.utils import RateLimiter +from osrs.exceptions import PlayerDoesNotExist, Undefined, UnexpectedRedirection +from osrs.utils import RateLimiter logger = logging.getLogger(__name__) @@ -40,7 +40,7 @@ class PlayerStats(BaseModel): activities: list[Activity] -class hiscore: +class Hiscore: BASE_URL = "https://secure.runescape.com" def __init__( diff --git a/osrs/utils/__init__.py b/osrs/utils/__init__.py index f1ff72a..9f370c7 100644 --- a/osrs/utils/__init__.py +++ b/osrs/utils/__init__.py @@ -1,4 +1,4 @@ -from src.utils.ratelimiter import RateLimiter +from osrs.utils.ratelimiter import RateLimiter __all__ = [ "RateLimiter", diff --git a/tests/test_async_hiscore.py b/tests/test_async_hiscore.py index 10c6d54..71d6cf2 100644 --- a/tests/test_async_hiscore.py +++ b/tests/test_async_hiscore.py @@ -1,8 +1,8 @@ import pytest from aiohttp import ClientSession -from src.async_api.osrs.hiscores import Mode, PlayerStats, hiscore -from src.exceptions import PlayerDoesNotExist +from osrs.async_api.osrs.hiscores import Mode, PlayerStats, hiscore +from osrs.exceptions import PlayerDoesNotExist @pytest.mark.asyncio