spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stibbons <>
Subject [GitHub] spark pull request #14567: Python import reorg
Date Tue, 09 Aug 2016 16:44:28 GMT
GitHub user Stibbons opened a pull request:

    Python import reorg

    ## What changes were proposed in this pull request?
    This patch adds a code style validation script following pep8 recommendations.
    - add a .editconfig file (Scala files use 2 space indentation, while Python uses 4) for
compatible editors (almost every editors has a plugin to support .editconfig file)
    - use autopep8 to fix basic pep8 mistakes
    - use isort to automatically split "import" statement and organise them into logically
linked order (see doc [here](
The most important thing is that it split import statements that imports more than one object
into several lines. This will increase the number of line of the file, but this facilitates
a lot file maintainance and file merges if needed.
    - add a '' script in order to automatise the correction (need isort and autopep8
    You can see similar script in prod in the [Buildbot](
    ## How was this patch tested?
    Simple tests on my machines has been done (local mode only). There should not have any
regression or feature change at all with this pull request.

You can merge this pull request into a Git repository by running:

    $ git pull python_import_reorg

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #14567
commit 61d6f38470ded699d0a0a751a79f069f1bf66cb1
Author: Gaetan Semet <>
Date:   2016-08-09T16:13:55Z

    reorg python imports statements

commit 2b719bec3e286e60d5f4f895e9d044c0f6ac0b84
Author: Gaetan Semet <>
Date:   2016-08-09T16:13:20Z


commit 97540d727679cc72ce13368f56c69ec412b6f162
Author: Gaetan Semet <>
Date:   2016-08-09T16:14:10Z

    import isort

commit 85a56ec22f4d2829242b0f1a9491bae7d117c18e
Author: Gaetan Semet <>
Date:   2016-08-09T16:35:39Z

    validate script

commit 84320dd6ba6c7d6c367d422423d2f5c1a95c6f82
Author: Gaetan Semet <>
Date:   2016-08-09T16:36:00Z

    isort execution


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message