Skip to content

Commit

Permalink
Merge pull request #266 from praw-dev/fix-typing
Browse files Browse the repository at this point in the history
Fix type checking imports
  • Loading branch information
LilSpazJoekp authored Nov 26, 2023
2 parents 0c06c50 + 65d68d7 commit 1b59c13
Show file tree
Hide file tree
Showing 31 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion asyncpraw/models/comment_forest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from .reddit.more import MoreComments

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class CommentForest:
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/front.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from .listing.mixins import SubredditListingMixin

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class Front(SubredditListingMixin):
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from .reddit.multi import Multireddit, Subreddit

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class DraftHelper(AsyncPRAWBase):
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/inbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from .util import stream_generator

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class Inbox(AsyncPRAWBase):
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/listing/mixins/redditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from .gilded import GildedListingMixin

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class SubListing(BaseListingMixin):
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/listing/mixins/rising.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from ..generator import ListingGenerator

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class RisingListingMixin(AsyncPRAWBase):
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/listing/mixins/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from ..generator import ListingGenerator

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class SubmissionListingMixin(AsyncPRAWBase):
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/listing/mixins/subreddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from .rising import RisingListingMixin

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class CommentHelper(AsyncPRAWBase):
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/mod_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from .reddit.redditor import Redditor

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class ModAction(AsyncPRAWBase):
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/mod_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from .reddit.submission import Submission

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models

RedditorType = Union[Redditor, str]
SubredditType = Union["asyncpraw.models.Subreddit", str]
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/reddit/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from .subreddit import Subreddit

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class CollectionModeration(AsyncPRAWBase):
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/reddit/comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from .subreddit import Subreddit

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class Comment(InboxableMixin, UserContentMixin, FullnameMixin, RedditBase):
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/reddit/draft.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from .user_subreddit import UserSubreddit

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class Draft(RedditBase):
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/reddit/live.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from .redditor import Redditor

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class LiveContributorRelationship:
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/reddit/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from .subreddit import Subreddit

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class Message(InboxableMixin, ReplyableMixin, FullnameMixin, RedditBase):
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/reddit/mixins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from .votable import VotableMixin

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class ThingModerationMixin(ModNoteMixin):
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/reddit/mixins/editable.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ....const import API_PATH

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class EditableMixin:
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/reddit/mixins/modnote.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import TYPE_CHECKING, Any, AsyncGenerator

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class ModNoteMixin:
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/reddit/mixins/replyable.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ....const import API_PATH

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class ReplyableMixin:
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/reddit/more.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from ..base import AsyncPRAWBase

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class MoreComments(AsyncPRAWBase):
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/reddit/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from .subreddit import Subreddit, SubredditStream

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class Multireddit(SubredditListingMixin, RedditBase):
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/reddit/redditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from .mixins import FullnameMixin, MessageableMixin

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class Redditor(MessageableMixin, RedditorListingMixin, FullnameMixin, RedditBase):
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/reddit/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from .base import RedditBase

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class Rule(RedditBase):
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/reddit/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from .subreddit import Subreddit

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models

INLINE_MEDIA_PATTERN = re.compile(
r"\n\n!?(\[.*?])?\(?((https://((preview|i)\.redd\.it|reddit.com/link).*?)|(?!https)([a-zA-Z0-9]+( \".*?\")?))\)?"
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/reddit/subreddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
if TYPE_CHECKING: # pragma: no cover
from aiohttp import ClientResponse

import asyncpraw
import asyncpraw.models


class Modmail:
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/reddit/user_subreddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .subreddit import Subreddit, SubredditModeration

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class UserSubreddit(Subreddit):
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/reddit/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from ..list.base import BaseList

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models

WidgetType: TypeVar = TypeVar("WidgetType", bound="Widget")

Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/reddit/wikipage.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from .redditor import Redditor

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class WikiPageModeration:
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/redditors.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from .util import stream_generator

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class PartialRedditor(SimpleNamespace):
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/subreddits.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from .util import stream_generator

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class Subreddits(AsyncPRAWBase):
Expand Down
2 changes: 1 addition & 1 deletion asyncpraw/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from .reddit.subreddit import Subreddit

if TYPE_CHECKING: # pragma: no cover
import asyncpraw
import asyncpraw.models


class User(AsyncPRAWBase):
Expand Down

0 comments on commit 1b59c13

Please sign in to comment.