Added black configuration
Added only black configuration as per @tomchristie request here https://github.com/encode/django-rest-framework/pull/6586.
@tomchristie should we go ahead with the --skip-string-normalization argument?
should we go ahead with the --skip-string-normalization argument?
I suggest to postpone this until a decision is made regarding DEP 0008 (PR django/deps#55, ML thread). It would be nice to follow the same formatting Django uses.
Thanks for the link - excellent write up by Aymeric.
I would definitely value maintaining consistency with Django, however I'd also be interested in comparing the relative impact of black with and without string normalization. In part, because black will disrupt existing PRs, and disabling string normalization might significantly reduce that disruption.
Do we really want black ?
I know there is divided opinion on it.
For me I like the consistency, as I often forget hanging indentation or a trailing comma, which then takes time to both review and fix.
It would stop the need to review and merge pull requests like this, again protecting valuable time of all involved. (I'm not saying this shouldn't have been merged, rather that it would never have been created in the first place).
https://github.com/encode/django-rest-framework/pull/7539
I'm +1 on Black. I think DRF can be a bit more aggressive than Django on adopting it. It's still in beta but I've not seen any code formatting mistakes due to using it in just over a year using it on my closed and open source projects.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Black has now a stable release and it seems Django now also added black as of https://code.djangoproject.com/ticket/33476
It would be great to get this implemented in DRF as well.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Black has now a stable release and it seems Django now also added black as of https://code.djangoproject.com/ticket/33476
It would be great to get this implemented in DRF as well.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.