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

Fermé
rezemika veut fusionner 1 commits à partir de rezemika/black vers FFDN/master
rezemika a commenté il y a 6 ans

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 a commenté il y a 6 ans
Propriétaire

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 a commenté il y a 6 ans
Publier

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 a commenté il y a 6 ans
Propriétaire

@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
Veuillez rouvrir cette Pull Request pour effectuer l'opération de fusion.
Connectez-vous pour rejoindre cette conversation.
Aucun jalon
Pas d'assignataire
2 Participants
Chargement…
Annuler
Enregistrer
Il n'existe pas encore de contenu.