-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
refactor tab modification by components #6549
Conversation
1ea8833
to
3a3cde0
Compare
else: | ||
# If not iterable, return immediately and let validation handle. | ||
return | ||
def _a_component_is_present(request, advanced_components): |
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.
I'd prefer to name it so is_advanced_module_present
.
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.
Looks like _a_component_is_present
and _component_value_true
get the same arguments, but argument's names differ. I'd like to see the same names in both function. For example, components
.
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.
let's settle on is_advanced_component_present
- they are called components all over
734ddeb
to
b157949
Compare
|
||
|
||
# pylint: disable=invalid-name | ||
def _config_course_settings(request, course_module, filter_tabs=True): | ||
def _component_value_true(request, component_types): |
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.
I'd prefer to name it so is_field_value_true
or is_truthy
.
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.
Do we really need to pass the request as an argument or we can pass request.json
instead?
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.
is_field_value_true
it is
👍 once tests pass and small comments will be addressed. |
8a04711
to
56a75b5
Compare
56a75b5
to
c384ee5
Compare
refactor tab modification by components
@polesye please take a look