Skip to content

Commit

Permalink
Merge pull request #1993 from akd-io/feature/fix-typing
Browse files Browse the repository at this point in the history
Fix type checking imports
  • Loading branch information
LilSpazJoekp committed Nov 9, 2023
2 parents f0f3dad + ff019f3 commit 6f3ee5c
Show file tree
Hide file tree
Showing 31 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion praw/models/comment_forest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .reddit.more import MoreComments

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


class CommentForest:
Expand Down
2 changes: 1 addition & 1 deletion praw/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 praw
import praw.models


class Front(SubredditListingMixin):
Expand Down
2 changes: 1 addition & 1 deletion praw/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 praw
import praw.models


class DraftHelper(PRAWBase):
Expand Down
2 changes: 1 addition & 1 deletion praw/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 praw
import praw.models


class Inbox(PRAWBase):
Expand Down
2 changes: 1 addition & 1 deletion praw/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 praw
import praw.models


class SubListing(BaseListingMixin):
Expand Down
2 changes: 1 addition & 1 deletion praw/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 praw
import praw.models


class RisingListingMixin(PRAWBase):
Expand Down
2 changes: 1 addition & 1 deletion praw/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 praw
import praw.models


class SubmissionListingMixin(PRAWBase):
Expand Down
2 changes: 1 addition & 1 deletion praw/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 praw
import praw.models


class CommentHelper(PRAWBase):
Expand Down
2 changes: 1 addition & 1 deletion praw/models/mod_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from .base import PRAWBase

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


class ModAction(PRAWBase):
Expand Down
2 changes: 1 addition & 1 deletion praw/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 praw
import praw.models

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

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


class CollectionModeration(PRAWBase):
Expand Down
2 changes: 1 addition & 1 deletion praw/models/reddit/comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from .redditor import Redditor

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


class Comment(InboxableMixin, UserContentMixin, FullnameMixin, RedditBase):
Expand Down
2 changes: 1 addition & 1 deletion praw/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 praw
import praw.models


class Draft(RedditBase):
Expand Down
2 changes: 1 addition & 1 deletion praw/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 praw
import praw.models


class LiveContributorRelationship:
Expand Down
2 changes: 1 addition & 1 deletion praw/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 praw
import praw.models


class Message(InboxableMixin, ReplyableMixin, FullnameMixin, RedditBase):
Expand Down
2 changes: 1 addition & 1 deletion praw/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 praw
import praw.models


class ThingModerationMixin(ModNoteMixin):
Expand Down
2 changes: 1 addition & 1 deletion praw/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 praw
import praw.models


class EditableMixin:
Expand Down
2 changes: 1 addition & 1 deletion praw/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, Generator

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


class ModNoteMixin:
Expand Down
2 changes: 1 addition & 1 deletion praw/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 praw
import praw.models


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

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


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

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


class Multireddit(SubredditListingMixin, RedditBase):
Expand Down
2 changes: 1 addition & 1 deletion praw/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 praw
import praw.models


class Redditor(MessageableMixin, RedditorListingMixin, FullnameMixin, RedditBase):
Expand Down
2 changes: 1 addition & 1 deletion praw/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 praw
import praw.models


class Rule(RedditBase):
Expand Down
2 changes: 1 addition & 1 deletion praw/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 praw
import praw.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 praw/models/reddit/subreddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
if TYPE_CHECKING: # pragma: no cover
from requests import Response

import praw
import praw.models


class Modmail:
Expand Down
2 changes: 1 addition & 1 deletion praw/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 praw
import praw.models


class UserSubreddit(Subreddit):
Expand Down
2 changes: 1 addition & 1 deletion praw/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 praw
import praw.models

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

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

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


class WikiPageModeration:
Expand Down
2 changes: 1 addition & 1 deletion praw/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 praw
import praw.models


class PartialRedditor(SimpleNamespace):
Expand Down
2 changes: 1 addition & 1 deletion praw/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 praw
import praw.models


class Subreddits(PRAWBase):
Expand Down
2 changes: 1 addition & 1 deletion praw/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 praw
import praw.models


class User(PRAWBase):
Expand Down

0 comments on commit 6f3ee5c

Please sign in to comment.