jpvanhal / inflection

A port of Ruby on Rails' inflector to Python
https://inflection.readthedocs.io
MIT License
488 stars 60 forks source link

Camelize with uppercase_first_letter=True on CAPSED leads to cAPSED #36

Open BlackHobbiT opened 4 years ago

BlackHobbiT commented 4 years ago

`In [11]: camelize('GOOOD') Out[11]: 'GOOOD'

In [12]: camelize('GOOOD', False) Out[12]: 'gOOOD'

In [13]: camelize('GOOODbaaad', False) Out[13]: 'gOOODbaaad'

In [14]: camelize('GOOODbaaad') Out[14]: 'GOOODbaaad'

In [15]: camelize('GOOOD_baaad') Out[15]: 'GOOODBaaad'

In [16]: camelize('GOOOD_baaad', False) Out[16]: 'gOOODBaaad'`

I thin this is incorrect behaviour

Rocamonde commented 4 years ago

Please, see my fork in http://github.com/Rocamonde/inflection. Current version fixes this problem. Feel free to follow up on this fork and open any issues there if you find any other bugs.