furious-luke / django-address

A Django address model and field. Addresses may be specified by address components or by performing an automatic Google Maps lookup.
BSD 3-Clause "New" or "Revised" License
428 stars 178 forks source link

:art: Reformat codebase using Black #153

Closed furious-luke closed 2 years ago

furious-luke commented 2 years ago

I've also added a pyproject.toml file, and included Black as a dev dependency.

banagale commented 2 years ago

Just getting to this. I have not formatted with black before, I know it is pretty common now. 

Only part I'll have to get used to is the full quotes. I'm pretty used to singles. Should not be a problem to adjust my pycharm lint to watch for it and use the standard though.

furious-luke commented 2 years ago

I actually agree with you about the double quotes, I'm a single quote man too. However, I've come to (begrudgingly) accept that it's more important to have guaranteed consistency. I've found that it helps with reviewing, metrics gathering, and cognitive load, to be able to ensure there are no spurious style related changes in PRs.

banagale commented 2 years ago

Ya, I think it looks cleaner to use single quotes. 

But I've seen projects that have them mixed and for the broader consistency black affords this makes complete sense. 

I see Black automatically converts singles, so maybe I can onboard fairly easily. They also make a decent case for choosing double quotes.