patchew-project / patchew

A patch email tracking and testing system
MIT License
72 stars 24 forks source link

Apply pep8 rules in api and www/views [v2] #96

Closed caiocarrara closed 5 years ago

caiocarrara commented 5 years ago

Most of the changes are simple indentation and blank lines spaces. There was also some import fixes that shuldn't change any behavior.

Probably the biggest change was in the method has_permission() of PatchewPermission class (api/rest.py). Firstly the use of backslash inside braces is redundant (to break lines). So in order to remove the backslashes and trying to make the permission conditions more readable I've tried the following approach.

It was also necessary to fix the help_text attributes of Project model fields. The way the help text strings were being used in Project model attributes was putting a lot of whitespaces and line breakes inside them[1].

If these changes be accepted I'm willing to continue applying it on other files.

[1] - more details in commit message


Changes from v1[#95]:

bonzini commented 5 years ago

Looks good, I'll wait for Fam to give it another look and then push.

famz commented 5 years ago

@bonzini let's use the next branch from now on (which is synced to next.patchew.org).

@cacarrara Please rebase to next branch where there is a migration conflict.

caiocarrara commented 5 years ago

@famz rebased to next :+1: