Page MenuHomeSoftware Heritage

blackify: auto format python code with black
ClosedPublic

Authored by zack on Sep 18 2020, 10:44 AM.

Diff Detail

Repository
rDICP Icinga plugins
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build has FAILED

Patch application report for D3983 (id=14045)

Rebasing onto ca1f5f7368...

Current branch diff-target is up to date.
Changes applied before test
commit f6c662ef2ee95328c8881438009e0b2a2e45640f
Author: Stefano Zacchiroli <zack@upsilon.cc>
Date:   Fri Sep 18 10:44:06 2020 +0200

    test_vault.py: make black pass again

Link to build: https://jenkins.softwareheritage.org/job/DICP/job/tests-on-diff/4/
See console output for more information: https://jenkins.softwareheritage.org/job/DICP/job/tests-on-diff/4/console

vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/icinga_plugins/tests/test_vault.py
289

you can remove the parentheses

This revision is now accepted and ready to land.Sep 18 2020, 11:21 AM
anlambert added a subscriber: anlambert.

The repository is missing configuration for using black. Could you add the pre-commit hook and the black configuration in pyproject.toml as in other swh repos ?

This revision now requires changes to proceed.Sep 18 2020, 11:22 AM

blackify all module, rather than just test_vault.py

zack retitled this revision from test_vault.py: make black pass again to blackify: auto format python code with black.Sep 18 2020, 5:13 PM

Build has FAILED

Patch application report for D3983 (id=14084)

Rebasing onto ca1f5f7368...

Current branch diff-target is up to date.
Changes applied before test
commit 54aaadb39c0f03f12bd07219ca11ad30ef7e11ac
Author: Stefano Zacchiroli <zack@upsilon.cc>
Date:   Fri Sep 18 10:44:06 2020 +0200

    blackify: auto format python code with black
    
    no semantic changes

Link to build: https://jenkins.softwareheritage.org/job/DICP/job/tests-on-diff/5/
See console output for more information: https://jenkins.softwareheritage.org/job/DICP/job/tests-on-diff/5/console

  • uniform tox.ini and setup.cfg with python module template

Build is green

Patch application report for D3983 (id=14085)

Rebasing onto ca1f5f7368...

Current branch diff-target is up to date.
Changes applied before test
commit c7e7a75a662561abec9602135b790f8c6f218493
Author: Stefano Zacchiroli <zack@upsilon.cc>
Date:   Fri Sep 18 17:16:06 2020 +0200

    uniform tox.ini and setup.cfg with python module template

commit 54aaadb39c0f03f12bd07219ca11ad30ef7e11ac
Author: Stefano Zacchiroli <zack@upsilon.cc>
Date:   Fri Sep 18 10:44:06 2020 +0200

    blackify: auto format python code with black
    
    no semantic changes

See https://jenkins.softwareheritage.org/job/DICP/job/tests-on-diff/6/ for more details.

The repository is missing configuration for using black. Could you add the pre-commit hook and the black configuration in pyproject.toml as in other swh repos ?

Oops, I didn't notice that, good catch!

Should be done now.

In D3983#98691, @zack wrote:

The repository is missing configuration for using black. Could you add the pre-commit hook and the black configuration in pyproject.toml as in other swh repos ?

Oops, I didn't notice that, good catch!

Should be done now.

Great, thanks !

This revision is now accepted and ready to land.Sep 18 2020, 5:20 PM