uk-fci / nhs-number

Python package to provide utilities for NHS Numbers, including validity checks, normalisation, and generation.
https://nhs-number.uk-fci.tech/
MIT License
6 stars 6 forks source link

PEP 8 formatting #13

Closed andylaw closed 1 year ago

andylaw commented 1 year ago

I tend to set my IDE to flag up violations of PEP 8 style guidelines. Having a set of agreed formatting rules prevents reformatting battles breaking out in commits to shared repositories. I note that some of the code written recently fails the line length checks in particular. Do we need to define a set of rules that can be enforced at commit time to make sure that we're all working with a consistent pattern?

eatyourpeas commented 1 year ago

I like Black and have that as standard in my IDE. I agree would be good to have a standard.

andylaw commented 1 year ago

Black is fine if you don't work with other people, or if you all work with it. In this case, I don't think it will be a high-maintenance, multiple commits kind of project so the precise details are less important.

I tend to use the PEP 8 defaults in PyCharm because it doesn't require me to install another dependency. I don't know if they play nicely, or fight with BlackCodeStyle

andylaw commented 1 year ago

The ideal technical choice respects explicit # @formatter-off / # @formatter-on directives

pacharanero commented 1 year ago

I'm happy to use whatever formatter is felt by the team to be the best. I'm using VSCode so ideally something that can be installed as a VSCode extension.

andylaw commented 1 year ago

Addressed by Pull Request #17