jaraco / inflect

Correctly generate plurals, ordinals, indefinite articles; convert numbers to words
https://pypi.org/project/inflect
MIT License
957 stars 107 forks source link

ordinal: use pydantic type coercion to ensure a consistent 'Word' input type for 'num' argument #179

Closed jayaddison closed 1 year ago

jayaddison commented 1 year ago

May resolve #178.

jayaddison commented 1 year ago

Test coverage is included in this commit series, but omitted from the resulting changeset (by reverting the relevant commit) because without further guidance it seems unclear whether it's a good idea to add the responsibility of supporting decimal-fraction ordinals to the library.

(in other words: this changeset improves support for some specific decimal-fraction ordinal cases, and references relevant test coverage, but doesn't yet add any guarantees that ordinals are well-supported for decimal-fractions in general)

jaraco commented 1 year ago

Merged in c81b81b without the test reversion. Let's keep that to retain the expectation. Thanks!