Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snake_case conversion eats existing underscores #49

Open
plinss opened this issue Jan 23, 2020 · 0 comments
Open

snake_case conversion eats existing underscores #49

plinss opened this issue Jan 23, 2020 · 0 comments

Comments

@plinss
Copy link

plinss commented Jan 23, 2020

This is a very useful plugin for converting legacy Python code to be PEP8 compliant.

However, a common convention in Python is to use leading underscores for private variables. When performing a snake_case conversion leading and trailing underscores are lost. e.g.:

_myVar -> my_var
myVar -> my_var

Ideally those should be preserved:
_myVar -> _my_var
myVar -> my_var

Additionally, existing multiple internal underscores are converted to single underscores. e.g.:
my__Var -> my_var

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant