#156 Reformates all the code with Black to unify it make it more PEP8-friendly

Closed
rezemika wants to merge 1 commits from rezemika/black into FFDN/master
rezemika commented 6 years ago

I recently discovered Black (https://github.com/ambv/black), a tool which allows to reformat automatically the codebase of a project to unify practices (like indentation, quotes usage, etc) following PEP8.

Here is an article about this tool: http://sametmax.com/once-you-go-black-you-never-go-back/

Indeed, the new format can be (should be?) criticized, but "it does the job". Of course, I can modify some parts of the code, find another tool, or just let the code as is. This pull request is so big, this should be discussed before merging it.

----- Commit message:

This quite-huge commit uses Black (https://github.com/ambv/black) to reformat all the Python code of the project (except migrations files, which are automatically generated by Django) to make the codebase more PEP8-friendly.

The following file could be reformatted by Black (it verifies that the syntaxic tree does not change for each file), and so were reformatted by hand:

  • coin/offers/management/commands/offer_subscriptions_count.py
  • coin/offers/views.py
  • coin/contrib/vpn_acct.py
I recently discovered Black (https://github.com/ambv/black), a tool which allows to reformat automatically the codebase of a project to unify practices (like indentation, quotes usage, etc) following PEP8. Here is an article about this tool: http://sametmax.com/once-you-go-black-you-never-go-back/ Indeed, the new format can be (should be?) criticized, but "it does the job". Of course, I can modify some parts of the code, find another tool, or just let the code as is. **This pull request is so big, this should be discussed before merging it.** ----- Commit message: This quite-huge commit uses Black (https://github.com/ambv/black) to reformat all the Python code of the project (except migrations files, which are automatically generated by Django) to make the codebase more PEP8-friendly. The following file could be reformatted by Black (it verifies that the syntaxic tree does not change for each file), and so were reformatted by hand: - coin/offers/management/commands/offer_subscriptions_count.py - coin/offers/views.py - coin/contrib/vpn_acct.py
jocelyn commented 6 years ago
Owner

Good :-).

However I think in current state (many PR are opened), we cannot merge this PR.

Maybe later, after we manage to lower the number of open PR to something more reasonable you could re-run black on the code base one more time ?

Good :-). However I think in current state (many PR are opened), we cannot merge this PR. Maybe later, after we manage to lower the number of open PR to something more reasonable you could re-run black on the code base one more time ?
rezemika commented 6 years ago
Poster

I agree, I thought I could create this PR to create a space to discuss about this idea, but it is indeed to soon to merge it now. Of course, I can re-run black whenever you want. :)

I agree, I thought I could create this PR to create a space to discuss about this idea, but it is indeed to soon to merge it now. Of course, I can re-run black whenever you want. :)
jocelyn commented 6 years ago
Owner

@rezemika je ferme pour l'instant ; l'idée est très bonne mais inaplicable tant qu'on a des PR conséquente ouvertes, ce qui semble être un état de fait permanent pour coin :p

@rezemika je ferme pour l'instant ; l'idée est très bonne mais inaplicable tant qu'on a des PR conséquente ouvertes, ce qui semble être un état de fait permanent pour coin :p
Please reopen this pull request to perform merge operation.
Sign in to join this conversation.
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.