Skip to content
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

Merged
merged 1 commit into from
Jan 12, 2015
Merged

Conversation

tymofij
Copy link
Contributor

@tymofij tymofij commented Jan 12, 2015

@polesye please take a look

else:
# If not iterable, return immediately and let validation handle.
return
def _a_component_is_present(request, advanced_components):
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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

@tymofij tymofij force-pushed the tim/modify_tabs branch 2 times, most recently from 734ddeb to b157949 Compare January 12, 2015 12:42


# pylint: disable=invalid-name
def _config_course_settings(request, course_module, filter_tabs=True):
def _component_value_true(request, component_types):
Copy link
Contributor

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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

@polesye
Copy link
Contributor

polesye commented Jan 12, 2015

👍 once tests pass and small comments will be addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants