diff --git a/aiobungie/__init__.py b/aiobungie/__init__.py index d586171e..f475b65e 100644 --- a/aiobungie/__init__.py +++ b/aiobungie/__init__.py @@ -25,7 +25,7 @@ from __future__ import annotations -__all__: Sequence[str] = ( +__all__: tuple[str, ...] = ( # __init__.py "__about__", "__author__", @@ -67,8 +67,6 @@ "CredentialType", ) -from typing import Sequence - from .client import Client from .error import * from .internal.enums import * diff --git a/aiobungie/__init__.pyi b/aiobungie/__init__.pyi index 2893def7..86df84ad 100644 --- a/aiobungie/__init__.pyi +++ b/aiobungie/__init__.pyi @@ -1,9 +1,7 @@ from .error import * from .internal.enums import * from .client import Client as Client -from typing import Any -__all__: Any __version__: str __about__: str __author__: str diff --git a/aiobungie/client.py b/aiobungie/client.py index 462a8951..fbe2a82f 100644 --- a/aiobungie/client.py +++ b/aiobungie/client.py @@ -25,9 +25,7 @@ from __future__ import annotations -__all__: typing.Sequence[str] = [ - "Client", -] +__all__: list[str] = ["Client"] import asyncio import typing @@ -56,7 +54,7 @@ class Client(impl.BaseClient): asyncio event loop. """ - __slots__: typing.Sequence[str] = ("loop", "http", "_serialize", "_token") + __slots__: tuple[str, ...] = ("loop", "http", "_serialize", "_token") def __init__(self, token: str, *, loop: asyncio.AbstractEventLoop = None) -> None: self.loop: asyncio.AbstractEventLoop = ( # asyncio loop. diff --git a/aiobungie/crate/__init__.py b/aiobungie/crate/__init__.py index 72bef873..307970f2 100644 --- a/aiobungie/crate/__init__.py +++ b/aiobungie/crate/__init__.py @@ -29,7 +29,7 @@ from __future__ import annotations -__all__: Seq[str] = [ +__all__: tuple[str, ...] = ( "Application", "PostActivity", "Clan", @@ -47,9 +47,7 @@ "ProfileComponentImpl", "Entity", "HardLinkedMembership", -] - -from typing import Sequence as Seq +) from .activity import Activity from .activity import PostActivity diff --git a/aiobungie/crate/__init__.pyi b/aiobungie/crate/__init__.pyi index 577923a3..28c884a4 100644 --- a/aiobungie/crate/__init__.pyi +++ b/aiobungie/crate/__init__.pyi @@ -1,11 +1,15 @@ from .activity import Activity as Activity, PostActivity as PostActivity -from .application import Application as Application, ApplicationOwner as ApplicationOwner +from .application import ( + Application as Application, + ApplicationOwner as ApplicationOwner, +) from .character import Character as Character, CharacterComponent as CharacterComponent from .clans import Clan as Clan, ClanMember as ClanMember, ClanOwner as ClanOwner from .entity import Entity as Entity, InventoryEntity as InventoryEntity from .player import Player as Player from .profile import Profile as Profile, ProfileComponentImpl as ProfileComponentImpl -from .user import HardLinkedMembership as HardLinkedMembership, User as User, UserLike as UserLike -from typing import Any - -__all__: Any \ No newline at end of file +from .user import ( + HardLinkedMembership as HardLinkedMembership, + User as User, + UserLike as UserLike, +) diff --git a/aiobungie/crate/activity.py b/aiobungie/crate/activity.py index f2b7bf81..25cf889f 100644 --- a/aiobungie/crate/activity.py +++ b/aiobungie/crate/activity.py @@ -28,7 +28,7 @@ from __future__ import annotations -__all__: typing.Sequence[str] = ("Activity", "PostActivity") +__all__: tuple[str, ...] = ("Activity", "PostActivity") import typing from datetime import datetime diff --git a/aiobungie/crate/application.py b/aiobungie/crate/application.py index 1f49bb81..34ab47b8 100644 --- a/aiobungie/crate/application.py +++ b/aiobungie/crate/application.py @@ -25,7 +25,7 @@ from __future__ import annotations -__all__: typing.Sequence[str] = ("Application", "ApplicationOwner") +__all__: tuple[str, ...] = ("Application", "ApplicationOwner") import typing from datetime import datetime diff --git a/aiobungie/crate/character.py b/aiobungie/crate/character.py index c10349a8..2b3c81dd 100644 --- a/aiobungie/crate/character.py +++ b/aiobungie/crate/character.py @@ -26,7 +26,7 @@ from __future__ import annotations -__all__: typing.Sequence[str] = ("CharacterComponent", "Character") +__all__: tuple[str, ...] = ("CharacterComponent", "Character") import abc import datetime diff --git a/aiobungie/crate/clans.py b/aiobungie/crate/clans.py index 1962efdd..2a639570 100644 --- a/aiobungie/crate/clans.py +++ b/aiobungie/crate/clans.py @@ -25,7 +25,7 @@ from __future__ import annotations -__all__: typing.List[str] = ["Clan", "ClanOwner", "ClanMember", "ClanFeatures"] +__all__: tuple[str, ...] = ("Clan", "ClanOwner", "ClanMember", "ClanFeatures") import typing diff --git a/aiobungie/crate/entity.py b/aiobungie/crate/entity.py index f8ef6eb9..bf43cad7 100644 --- a/aiobungie/crate/entity.py +++ b/aiobungie/crate/entity.py @@ -28,7 +28,7 @@ from __future__ import annotations -__all__: typing.Sequence[str] = ["InventoryEntity", "Entity"] +__all__: tuple[str, ...] = ("InventoryEntity", "Entity") import abc import typing diff --git a/aiobungie/crate/player.py b/aiobungie/crate/player.py index 32ea6c36..d006634f 100644 --- a/aiobungie/crate/player.py +++ b/aiobungie/crate/player.py @@ -25,7 +25,7 @@ from __future__ import annotations -__all__: typing.Sequence[str] = ["Player"] +__all__: tuple[str, ...] = ("Player",) import typing @@ -42,7 +42,6 @@ class Player(UserLike): """Represents a Bungie Destiny 2 Player.""" - icon: Image = attr.field(repr=False, hash=False, eq=False) """The player's icon.""" @@ -57,7 +56,7 @@ class Player(UserLike): type: MembershipType = attr.field(repr=True, eq=True, hash=False) """The profile's membership type.""" - + @property def net(self) -> impl.Netrunner: """A network state used for making external requests.""" diff --git a/aiobungie/crate/profile.py b/aiobungie/crate/profile.py index 384a16f5..d54d5075 100644 --- a/aiobungie/crate/profile.py +++ b/aiobungie/crate/profile.py @@ -24,7 +24,7 @@ from __future__ import annotations -__all__: typing.Sequence[str] = ("Profile", "ProfileComponentImpl") +__all__: tuple[str, ...] = ("Profile", "ProfileComponentImpl") import abc import datetime diff --git a/aiobungie/crate/user.py b/aiobungie/crate/user.py index 30cc3bf7..a6445a4a 100644 --- a/aiobungie/crate/user.py +++ b/aiobungie/crate/user.py @@ -25,12 +25,12 @@ from __future__ import annotations -__all__: typing.Sequence[str] = [ +__all__: tuple[str, ...] = ( "User", "PartialUser", "UserLike", "HardLinkedMembership", -] +) import abc import typing diff --git a/aiobungie/error.py b/aiobungie/error.py index 0db027c4..515085af 100644 --- a/aiobungie/error.py +++ b/aiobungie/error.py @@ -24,7 +24,7 @@ from __future__ import annotations -__all__: typing.Sequence[str] = [ +__all__: list[str] = [ "AiobungieError", "PlayerNotFound", "ActivityNotFound", diff --git a/aiobungie/ext/__init__.py b/aiobungie/ext/__init__.py index ae30b3e1..b605a0da 100644 --- a/aiobungie/ext/__init__.py +++ b/aiobungie/ext/__init__.py @@ -24,8 +24,6 @@ from __future__ import annotations -__all__: typing.Sequence[str] = ["Manifest"] - -import typing +__all__: tuple[str, ...] = ("Manifest",) from .meta import Manifest diff --git a/aiobungie/ext/meta.py b/aiobungie/ext/meta.py index 12562bde..a88a2f7b 100644 --- a/aiobungie/ext/meta.py +++ b/aiobungie/ext/meta.py @@ -25,8 +25,7 @@ from __future__ import annotations - -__all__: t.Sequence[str] = ("Manifest",) +__all__: tuple[str, ...] = ("Manifest",) import logging import os diff --git a/aiobungie/http.py b/aiobungie/http.py index 37e8689f..06b2d640 100644 --- a/aiobungie/http.py +++ b/aiobungie/http.py @@ -28,7 +28,7 @@ from aiobungie.internal.helpers import JsonDict -__all__ = ("HTTPClient",) +__all__: tuple[str, ...] = ("HTTPClient",) import http import types @@ -84,7 +84,7 @@ async def handle_errors( class PreLock: - __slots__: typing.Sequence[str] = ("_lock",) + __slots__: tuple[str, ...] = ("_lock",) def __init__(self, locker: asyncio.Lock) -> None: self._lock: asyncio.Lock = locker diff --git a/aiobungie/internal/__init__.py b/aiobungie/internal/__init__.py index a2174c0c..0e7d6791 100644 --- a/aiobungie/internal/__init__.py +++ b/aiobungie/internal/__init__.py @@ -25,9 +25,7 @@ from __future__ import annotations -from typing import Sequence - -__all__: Sequence[str] = [ +__all__: list[str] = [ "Image", "enums", "deprecated", diff --git a/aiobungie/internal/__init__.pyi b/aiobungie/internal/__init__.pyi index f6851f3b..75a615af 100644 --- a/aiobungie/internal/__init__.pyi +++ b/aiobungie/internal/__init__.pyi @@ -1,6 +1,3 @@ from . import enums as enums from .assets import Image as Image from .helpers import deprecated as deprecated -from typing import Any - -__all__: Any diff --git a/aiobungie/internal/assets.py b/aiobungie/internal/assets.py index 3f1d5682..d2184c07 100644 --- a/aiobungie/internal/assets.py +++ b/aiobungie/internal/assets.py @@ -25,9 +25,7 @@ from __future__ import annotations -__all__: typing.List[str] = ["Image"] - -import typing +__all__: list[str] = ["Image"] from aiobungie import url from aiobungie.internal import helpers diff --git a/aiobungie/internal/enums.py b/aiobungie/internal/enums.py index 7de90808..0212cdf9 100644 --- a/aiobungie/internal/enums.py +++ b/aiobungie/internal/enums.py @@ -25,7 +25,7 @@ from __future__ import annotations -__all__: typing.Sequence[str] = ( +__all__: tuple[str, ...] = ( "GameMode", "MembershipType", "Class", diff --git a/aiobungie/internal/helpers.py b/aiobungie/internal/helpers.py index 3ab68dbd..64976a45 100644 --- a/aiobungie/internal/helpers.py +++ b/aiobungie/internal/helpers.py @@ -25,7 +25,7 @@ from __future__ import annotations -__all__: typing.Sequence[str] = [ +__all__: tuple[str, ...] = ( "deprecated", "JsonDict", "JsonList", @@ -33,7 +33,7 @@ "Unknown", "just", "NoneOr", -] +) import typing import warnings diff --git a/aiobungie/internal/helpers.pyi b/aiobungie/internal/helpers.pyi index e097116c..1cbc6fc3 100644 --- a/aiobungie/internal/helpers.pyi +++ b/aiobungie/internal/helpers.pyi @@ -18,4 +18,4 @@ Undefined: str = "Undefined" Unknown: str = "" def just(lst: list[dict[str, __Any]], lookup: str) -> list[__Any]: ... -def deprecated(func): ... \ No newline at end of file +def deprecated(func): ... diff --git a/aiobungie/internal/impl.py b/aiobungie/internal/impl.py index 77e86202..92cb6cca 100644 --- a/aiobungie/internal/impl.py +++ b/aiobungie/internal/impl.py @@ -24,7 +24,7 @@ from __future__ import annotations -__all__: typing.Sequence[str] = ["BaseClient", "Netrunner"] +__all__: tuple[str, ...] = ("BaseClient", "Netrunner") import typing diff --git a/aiobungie/internal/serialize.py b/aiobungie/internal/serialize.py index ee3984f3..55432a04 100644 --- a/aiobungie/internal/serialize.py +++ b/aiobungie/internal/serialize.py @@ -23,7 +23,7 @@ from __future__ import annotations -__all__: typing.Sequence[str] = ["Deserialize"] +__all__: tuple[str, ...] = ("Deserialize",) import datetime import logging diff --git a/aiobungie/internal/time.py b/aiobungie/internal/time.py index 859160b7..ae0d5ab7 100644 --- a/aiobungie/internal/time.py +++ b/aiobungie/internal/time.py @@ -25,7 +25,7 @@ from __future__ import annotations -__all__: typing.Sequence[str] = [ +__all__: list[str] = [ "format_played", "from_timestamp", "clean_date", @@ -35,7 +35,6 @@ import calendar import math -import typing from datetime import datetime from dateutil.parser import parse diff --git a/aiobungie/url.py b/aiobungie/url.py index daf48bfe..704f6b7e 100644 --- a/aiobungie/url.py +++ b/aiobungie/url.py @@ -24,7 +24,7 @@ from __future__ import annotations -__all__: typing.Sequence[str] = ["BASE", "REST_EP", "OAUTH_EP", "TOKEN_EP"] +__all__: tuple[str, ...] = ("BASE", "REST_EP", "OAUTH_EP", "TOKEN_EP") import typing