[jira] [Commented] (PROTON-2320) Apply autofixes to resolve some flake8 code formatting issues

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Commented] (PROTON-2320) Apply autofixes to resolve some flake8 code formatting issues

ASF subversion and git services (Jira)

    [ https://issues.apache.org/jira/browse/PROTON-2320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17266052#comment-17266052 ]

ASF subversion and git services commented on PROTON-2320:

Commit 3d9429c6318e8bee247bd444999b7b1cc8da6782 in qpid-proton's branch refs/heads/master from Jiri Daněk
[ https://gitbox.apache.org/repos/asf?p=qpid-proton.git;h=3d9429c ]

PROTON-2320 Apply second round of autopep8 (--aggressive * 3) (#287)

> Apply autofixes to resolve some flake8 code formatting issues
> -------------------------------------------------------------
>                 Key: PROTON-2320
>                 URL: https://issues.apache.org/jira/browse/PROTON-2320
>             Project: Qpid Proton
>          Issue Type: Task
>          Components: python-binding
>    Affects Versions: proton-c-0.33.0
>            Reporter: Jiri Daněk
>            Assignee: Jiri Daněk
>            Priority: Major
>             Fix For: proton-c-0.34.0
> Python code in Proton does not follow PEP8. There are automated tools which can reformat the code to be more compliant (fix indentation, add spaces around operators, ...).
> {noformat}
> pip install autopep8
> for f in `find -name "*.py"`; do autopep8 --in-place $f; done
> {noformat}
> Autopep8 has several level of "aggressiveness". The least aggressive setting only changes whitespace. At a more aggressive setting, autopep8 will also rewrite some code constructs.
> My plan is to commit this in several stages. Avoid mixing manual changes and automatically generated changes in a single commit. Push the whitespace changes first and only then let autopep8 to be more creative; otherwise the rewrites get drowned in the huge initial diff.
> I don't want to add flake8 to CI jobs just yet; I want to wait a few days with that.

This message was sent by Atlassian Jira

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]