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
4 stars 6 forks source link

Allows is_valid to take a string or an int #30

Closed fredkingham closed 1 year ago

fredkingham commented 1 year ago

The function can take a string or an integer so lets make sure that the type annotations show this.

andylaw commented 1 year ago

If I remember correctly, this pins us to a version of Python further along the line than we wanted (usable alternative argument type hints came in at 3.10, I think?). We left it as caveat utilitor so the code also works for 3.7, 3.8 and 3.9.

Thanks for the Pull request, but I think that we'd rather decline for the reasons above.

fredkingham commented 1 year ago

Makes sense, but then we should also remove them here https://github.com/uk-fci/nhs-number/blob/main/nhs_number/standardise.py#L25

andylaw commented 1 year ago

You are correct. We should.