-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Mypy type annotations to the core/controller
directory's files - 2.
#16461
Added Mypy type annotations to the core/controller
directory's files - 2.
#16461
Conversation
Unassigning @vojtechjelinek since they have already approved the PR. |
Hi @sahiljoster32. Due to recent changes in the "develop" branch, this PR now has a merge conflict. Please follow this link if you need help resolving the conflict, so that the PR can be merged. Thanks! |
@seanlip @BenHenning PTAL! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sahiljoster32 The changes look great, just very minor nits left -- otherwise LGTM. Thanks!
for reference in topic.get_all_story_references() | ||
if reference.story_is_published | ||
], | ||
strict=True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deindent this by 4, since it's in the (...) scope
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
core/controllers/learner_goals.py
Outdated
@@ -57,6 +57,12 @@ class LearnerGoalsHandler( | |||
'DELETE': {} | |||
} | |||
|
|||
# Note: Currently this handler only accepting one type of activity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
accepting --> accepts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
core/controllers/learner_goals.py
Outdated
@@ -57,6 +57,12 @@ class LearnerGoalsHandler( | |||
'DELETE': {} | |||
} | |||
|
|||
# Note: Currently this handler only accepting one type of activity | |||
# which is 'ACTIVITY_TYPE_LEARN_TOPIC', so 'activity_type' argument | |||
# is not used inside the function body but, in future if this handler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...inside the function body. But, in future, if this ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
core/controllers/learner_goals.py
Outdated
# Note: Currently this handler only accepting one type of activity | ||
# which is 'ACTIVITY_TYPE_LEARN_TOPIC', so 'activity_type' argument | ||
# is not used inside the function body but, in future if this handler | ||
# accepts more than one activity of type then please remove pylint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...one activity type, then please remove the pylint exception below and use an 'if-else' ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
core/controllers/learner_goals.py
Outdated
@@ -74,6 +80,12 @@ def post(self, activity_type: str, topic_id: str) -> None: # pylint: disable=un | |||
|
|||
self.render_json(self.values) | |||
|
|||
# Note: Currently this handler only accepting one type of activity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto as above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@seanlip PTAL! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Unassigning @seanlip since they have already approved the PR. |
Hi @sahiljoster32, this PR is ready to be merged. Please address any remaining comments prior to merging, and feel free to merge this PR once the CI checks pass and you're happy with it. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @sahiljoster32. LGTM for Android compatibility codeowners.
Hi @sahiljoster32, this PR is ready to be merged. Please address any remaining comments prior to merging, and feel free to merge this PR once the CI checks pass and you're happy with it. Thanks! |
Since all the comments are addressed and every reviewer approved the PR, I'm going to merge this PR. Thanks! |
Overview
core/controllers
directory.Essential Checklist
Proof that changes are correct
Proof of MyPy checks that changes are correct.
Proof of changes on desktop with slow/throttled network
Proof of changes on mobile phone
Proof of changes in Arabic language
PR Pointers