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.
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:
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
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 ?
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. :)
@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
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:
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 ?
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. :)
@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