|
16 | 16 |
|
17 | 17 | if TYPE_CHECKING: # pragma: no cover |
18 | 18 | from .... import praw |
19 | | - from ...reddit import models |
20 | 19 |
|
21 | 20 |
|
22 | 21 | class Comment(InboxableMixin, UserContentMixin, FullnameMixin, RedditBase): |
@@ -131,14 +130,14 @@ def replies(self) -> CommentForest: |
131 | 130 | return self._replies |
132 | 131 |
|
133 | 132 | @property |
134 | | - def submission(self) -> "models.Submission": |
| 133 | + def submission(self) -> "praw.models.Submission": |
135 | 134 | """Return the Submission object this comment belongs to.""" |
136 | 135 | if not self._submission: # Comment not from submission |
137 | 136 | self._submission = self._reddit.submission(self._extract_submission_id()) |
138 | 137 | return self._submission |
139 | 138 |
|
140 | 139 | @submission.setter |
141 | | - def submission(self, submission: "models.Submission"): |
| 140 | + def submission(self, submission: "praw.models.Submission"): |
142 | 141 | """Update the Submission associated with the Comment.""" |
143 | 142 | submission._comments_by_id[self.fullname] = self |
144 | 143 | self._submission = submission |
@@ -170,7 +169,7 @@ def __init__( |
170 | 169 | def __setattr__( |
171 | 170 | self, |
172 | 171 | attribute: str, |
173 | | - value: Union[str, "Redditor", "CommentForest", "models.subreddit.Subreddit"], |
| 172 | + value: Union[str, Redditor, CommentForest, "praw.models.Subreddit"], |
174 | 173 | ): |
175 | 174 | """Objectify author, replies, and subreddit.""" |
176 | 175 | if attribute == "author": |
@@ -210,7 +209,7 @@ def _extract_submission_id(self): |
210 | 209 | return self.context.rsplit("/", 4)[1] |
211 | 210 | return self.link_id.split("_", 1)[1] |
212 | 211 |
|
213 | | - def parent(self) -> Union["praw.models.Comment", "praw.models.Submission"]: |
| 212 | + def parent(self) -> Union["Comment", "praw.models.Submission"]: |
214 | 213 | """Return the parent of the comment. |
215 | 214 |
|
216 | 215 | The returned parent will be an instance of either :class:`.Comment`, or |
|
0 commit comments