Skip to content

Improving code style of careprofessional module - #71

Open
mateusmanuel wants to merge 1 commit into
gestorpsi:masterfrom
gestorpsi-mes-12017:refactoring_care_professional_code_style
Open

Improving code style of careprofessional module#71
mateusmanuel wants to merge 1 commit into
gestorpsi:masterfrom
gestorpsi-mes-12017:refactoring_care_professional_code_style

Conversation

@mateusmanuel

Copy link
Copy Markdown
Contributor

In this change only variable names, spaces and indentation has been changed. And all changes are done based on pylint, a lint tool that use PEP8 patterns.


def deactive(self, organization):
return super(CareProfessionalManager, self).get_query_set().filter(active=False, studentprofile__id__isnull=True, person__organization = organization).order_by('person__name')
return super(CareProfessionalManager, self).get_query_set().filter(active=False,

@JohnnysRibeiro JohnnysRibeiro Jul 3, 2017

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please be more consistent when breaking big lines into small ones.
Also try to reduce them into 80 characters per line or less.
This is an example on how it can be:

    def deactive(self, organization):
        return super(CareProfessionalManager, self).get_query_set() \
        .filter(active=False,
                studentprofile__id__isnull=True,
                person__organization=organization).order_by(
                'person__name')

@mateusmanuel mateusmanuel Jul 4, 2017

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about this indentation? I think that is more consistent.

    def deactive(self, organization):
        return super(CareProfessionalManager, self).get_query_set() \
            .filter(active=False, studentprofile__id__isnull=True,
                    person__organization=organization) \
            .order_by('person__name')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, imo.

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.

3 participants