python-betterproto
python-betterproto copied to clipboard
fix: no underscores after numbers when converting to snake case
Summary
Fixes #657
Usage:
>>> betterproto.casing.snake_case("C2S2C c2s2c")
'c2s2c_c2s2c'
>>> betterproto.casing.snake_case("Client2Server CLIENT2SERVER client2Server")
'client2server_client2server_client2server'
>>> betterproto.casing.snake_case("clientToServer")
'client_to_server'
Checklist
- [x] If code changes were made then they have been tested.
- [x] I have updated the documentation to reflect the changes.
- [x] This PR fixes an issue.
- [ ] This PR adds something new (e.g. new method or parameters).
- [ ] This change has an associated test.
- [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
- [ ] This PR is not a code change (e.g. documentation, README, ...)