Skip to content

Commit

Permalink
Moved hikari.utilities to hikari.internal, moved event_stream to hika…
Browse files Browse the repository at this point in the history
…ri package. (#253)
  • Loading branch information
Nekokatt authored Sep 30, 2020
1 parent 01759f3 commit 9ef0c33
Show file tree
Hide file tree
Showing 96 changed files with 149 additions and 152 deletions.
4 changes: 2 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ ignore =
per-file-ignores =
hikari/__init__.py: F401,F403
hikari/events/__init__.py: F401,F403
hikari/utilities/routes.py: FS003
hikari/utilities/time.py: FS003
hikari/impl/stateless_cache.py: R102
hikari/internal/routes.py: FS003
hikari/internal/time.py: FS003
tests/hikari/*: FS003,S106,D106,D104,D103,D101,D100

max-complexity = 20
Expand Down
2 changes: 1 addition & 1 deletion hikari/api/chunker.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
if typing.TYPE_CHECKING:
import datetime

from hikari import event_stream
from hikari import guilds
from hikari import snowflakes
from hikari import users as users_
from hikari.api import shard as gateway_shard
from hikari.events import shard_events
from hikari.utilities import event_stream


class RequestInformation(typing.Protocol):
Expand Down
4 changes: 2 additions & 2 deletions hikari/api/entity_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import attr

from hikari import undefined
from hikari.utilities import attr_extensions
from hikari.internal import attr_extensions

if typing.TYPE_CHECKING:
from hikari import applications as application_models
Expand All @@ -48,7 +48,7 @@
from hikari import users as user_models
from hikari import voices as voice_models
from hikari import webhooks as webhook_models
from hikari.utilities import data_binding
from hikari.internal import data_binding


@attr_extensions.with_copy
Expand Down
2 changes: 1 addition & 1 deletion hikari/api/event_dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
import typing

if typing.TYPE_CHECKING:
from hikari import event_stream
from hikari.events import base_events
from hikari.utilities import event_stream

EventT_co = typing.TypeVar("EventT_co", bound=base_events.Event, covariant=True)
EventT_inv = typing.TypeVar("EventT_inv", bound=base_events.Event)
Expand Down
2 changes: 1 addition & 1 deletion hikari/api/event_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
from hikari.events import typing_events
from hikari.events import user_events
from hikari.events import voice_events
from hikari.utilities import data_binding
from hikari.internal import data_binding


class EventFactory(typing.Protocol):
Expand Down
2 changes: 1 addition & 1 deletion hikari/api/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
from hikari import voices
from hikari import webhooks
from hikari.api import special_endpoints
from hikari.utilities import time
from hikari.internal import time


class ConnectorFactory(abc.ABC):
Expand Down
2 changes: 1 addition & 1 deletion hikari/api/shard.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import typing

from hikari import undefined
from hikari.utilities import enums
from hikari.internal import enums

if typing.TYPE_CHECKING:
import datetime
Expand Down
2 changes: 1 addition & 1 deletion hikari/api/special_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
from hikari import permissions as permissions_
from hikari import snowflakes
from hikari import voices
from hikari.utilities import time
from hikari.internal import time


class TypingIndicator(abc.ABC):
Expand Down
6 changes: 3 additions & 3 deletions hikari/applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
from hikari import guilds
from hikari import snowflakes
from hikari import urls
from hikari.utilities import attr_extensions
from hikari.utilities import enums
from hikari.utilities import routes
from hikari.internal import attr_extensions
from hikari.internal import enums
from hikari.internal import routes

if typing.TYPE_CHECKING:
from hikari import permissions as permissions_
Expand Down
6 changes: 3 additions & 3 deletions hikari/audit_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
import attr

from hikari import snowflakes
from hikari.utilities import attr_extensions
from hikari.utilities import collections
from hikari.utilities import enums
from hikari.internal import attr_extensions
from hikari.internal import collections
from hikari.internal import enums

if typing.TYPE_CHECKING:
from hikari import channels
Expand Down
6 changes: 3 additions & 3 deletions hikari/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
from hikari import undefined
from hikari import urls
from hikari import users
from hikari.utilities import attr_extensions
from hikari.utilities import enums
from hikari.utilities import routes
from hikari.internal import attr_extensions
from hikari.internal import enums
from hikari.internal import routes

if typing.TYPE_CHECKING:
import datetime
Expand Down
4 changes: 2 additions & 2 deletions hikari/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
import attr
import yarl

from hikari.utilities import attr_extensions
from hikari.utilities import data_binding
from hikari.internal import attr_extensions
from hikari.internal import data_binding

_BASICAUTH_TOKEN_PREFIX: typing.Final[str] = "Basic" # nosec
_PROXY_AUTHENTICATION_HEADER: typing.Final[str] = "Proxy-Authentication"
Expand Down
2 changes: 1 addition & 1 deletion hikari/embeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
from hikari import errors
from hikari import files
from hikari import undefined
from hikari.utilities import attr_extensions
from hikari.internal import attr_extensions

if typing.TYPE_CHECKING:
import concurrent.futures
Expand Down
4 changes: 2 additions & 2 deletions hikari/emojis.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
from hikari import files
from hikari import snowflakes
from hikari import urls
from hikari.utilities import attr_extensions
from hikari.utilities import routes
from hikari.internal import attr_extensions
from hikari.internal import routes

if typing.TYPE_CHECKING:
from hikari import traits
Expand Down
8 changes: 4 additions & 4 deletions hikari/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@

import attr

from hikari.utilities import attr_extensions
from hikari.utilities import enums
from hikari.internal import attr_extensions
from hikari.internal import enums

if typing.TYPE_CHECKING:
from hikari import intents as intents_
from hikari import messages
from hikari import snowflakes
from hikari.utilities import data_binding
from hikari.utilities import routes
from hikari.internal import data_binding
from hikari.internal import routes


@attr_extensions.with_copy
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion hikari/events/base_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from hikari import intents
from hikari import traits
from hikari.api import shard as gateway_shard
from hikari.utilities import attr_extensions
from hikari.internal import attr_extensions

if typing.TYPE_CHECKING:
import types
Expand Down
2 changes: 1 addition & 1 deletion hikari/events/channel_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
from hikari import traits
from hikari.events import base_events
from hikari.events import shard_events
from hikari.utilities import attr_extensions
from hikari.internal import attr_extensions

if typing.TYPE_CHECKING:
import datetime
Expand Down
2 changes: 1 addition & 1 deletion hikari/events/guild_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
from hikari import intents
from hikari.events import base_events
from hikari.events import shard_events
from hikari.utilities import attr_extensions
from hikari.internal import attr_extensions

if typing.TYPE_CHECKING:
from hikari import channels as channels_
Expand Down
2 changes: 1 addition & 1 deletion hikari/events/lifetime_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import attr

from hikari.events import base_events
from hikari.utilities import attr_extensions
from hikari.internal import attr_extensions

if typing.TYPE_CHECKING:
from hikari import traits
Expand Down
2 changes: 1 addition & 1 deletion hikari/events/member_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from hikari import traits
from hikari.events import base_events
from hikari.events import shard_events
from hikari.utilities import attr_extensions
from hikari.internal import attr_extensions

if typing.TYPE_CHECKING:
from hikari import guilds
Expand Down
2 changes: 1 addition & 1 deletion hikari/events/message_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
from hikari import users
from hikari.events import base_events
from hikari.events import shard_events
from hikari.utilities import attr_extensions
from hikari.internal import attr_extensions

if typing.TYPE_CHECKING:
from hikari import embeds as embeds_
Expand Down
2 changes: 1 addition & 1 deletion hikari/events/reaction_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
from hikari import intents
from hikari.events import base_events
from hikari.events import shard_events
from hikari.utilities import attr_extensions
from hikari.internal import attr_extensions

if typing.TYPE_CHECKING:
from hikari import emojis
Expand Down
2 changes: 1 addition & 1 deletion hikari/events/role_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
from hikari import intents
from hikari.events import base_events
from hikari.events import shard_events
from hikari.utilities import attr_extensions
from hikari.internal import attr_extensions

if typing.TYPE_CHECKING:
from hikari import guilds
Expand Down
4 changes: 2 additions & 2 deletions hikari/events/shard_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
import attr

from hikari.events import base_events
from hikari.utilities import attr_extensions
from hikari.utilities import collections
from hikari.internal import attr_extensions
from hikari.internal import collections

if typing.TYPE_CHECKING:
from hikari import guilds
Expand Down
2 changes: 1 addition & 1 deletion hikari/events/typing_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
from hikari.api import special_endpoints
from hikari.events import base_events
from hikari.events import shard_events
from hikari.utilities import attr_extensions
from hikari.internal import attr_extensions

if typing.TYPE_CHECKING:
import datetime
Expand Down
2 changes: 1 addition & 1 deletion hikari/events/user_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import attr

from hikari.events import shard_events
from hikari.utilities import attr_extensions
from hikari.internal import attr_extensions

if typing.TYPE_CHECKING:
from hikari import traits
Expand Down
2 changes: 1 addition & 1 deletion hikari/events/voice_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
from hikari import intents
from hikari.events import base_events
from hikari.events import shard_events
from hikari.utilities import attr_extensions
from hikari.internal import attr_extensions

if typing.TYPE_CHECKING:
from hikari import snowflakes
Expand Down
6 changes: 3 additions & 3 deletions hikari/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@
import aiohttp.client
import attr

from hikari.utilities import aio
from hikari.utilities import net
from hikari.utilities import time
from hikari.internal import aio
from hikari.internal import net
from hikari.internal import time

if typing.TYPE_CHECKING:
import types
Expand Down
8 changes: 4 additions & 4 deletions hikari/guilds.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@
from hikari import snowflakes
from hikari import urls
from hikari import users
from hikari.utilities import attr_extensions
from hikari.utilities import enums
from hikari.utilities import flag
from hikari.utilities import routes
from hikari.internal import attr_extensions
from hikari.internal import enums
from hikari.internal import flag
from hikari.internal import routes

if typing.TYPE_CHECKING:
import datetime
Expand Down
8 changes: 4 additions & 4 deletions hikari/impl/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

from hikari import config
from hikari import errors
from hikari import event_stream
from hikari import intents as intents_
from hikari import presences
from hikari import traits
Expand All @@ -59,10 +60,9 @@
from hikari.impl import rest as rest_impl
from hikari.impl import shard as shard_impl
from hikari.impl import voice as voice_impl
from hikari.utilities import aio
from hikari.utilities import event_stream
from hikari.utilities import time
from hikari.utilities import ux
from hikari.internal import aio
from hikari.internal import time
from hikari.internal import ux

if typing.TYPE_CHECKING:
from hikari.api import cache
Expand Down
8 changes: 4 additions & 4 deletions hikari/impl/buckets.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,10 @@
import typing

from hikari.impl import rate_limits
from hikari.utilities import aio
from hikari.utilities import routes
from hikari.utilities import time
from hikari.utilities import ux
from hikari.internal import aio
from hikari.internal import routes
from hikari.internal import time
from hikari.internal import ux

if typing.TYPE_CHECKING:
import types
Expand Down
6 changes: 3 additions & 3 deletions hikari/impl/entity_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
from hikari import voices as voice_models
from hikari import webhooks as webhook_models
from hikari.api import entity_factory
from hikari.utilities import attr_extensions
from hikari.utilities import data_binding
from hikari.utilities import time
from hikari.internal import attr_extensions
from hikari.internal import data_binding
from hikari.internal import time

_DEFAULT_MAX_PRESENCES: typing.Final[int] = 25000

Expand Down
6 changes: 3 additions & 3 deletions hikari/impl/event_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
from hikari.events import typing_events
from hikari.events import user_events
from hikari.events import voice_events
from hikari.utilities import collections
from hikari.utilities import data_binding
from hikari.utilities import time
from hikari.internal import collections
from hikari.internal import data_binding
from hikari.internal import time


class EventFactoryImpl(event_factory.EventFactory):
Expand Down
8 changes: 4 additions & 4 deletions hikari/impl/event_manager_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
import warnings

from hikari import errors
from hikari import event_stream
from hikari import intents as intents_
from hikari import traits
from hikari.api import event_dispatcher
from hikari.events import base_events
from hikari.utilities import aio
from hikari.utilities import data_binding
from hikari.utilities import event_stream
from hikari.utilities import reflect
from hikari.internal import aio
from hikari.internal import data_binding
from hikari.internal import reflect

if typing.TYPE_CHECKING:
from hikari.api import shard as gateway_shard
Expand Down
Loading

0 comments on commit 9ef0c33

Please sign in to comment.