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

Use consistent snake_case variable names #181

Open
krisgesling opened this issue Mar 29, 2021 · 1 comment
Open

Use consistent snake_case variable names #181

krisgesling opened this issue Mar 29, 2021 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@krisgesling
Copy link
Contributor

Just going through a PR and there are camelCase variable names sprinkled through out the code base. Would be good to move to the Python standard snake_case for the whole repo.

The challenge will be anchorDate as it's used in a public method and hence by downstream users. Will need to deprecate it and support that kwarg for some period of time.

@krisgesling krisgesling added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Mar 29, 2021
@ChanceNCounter
Copy link
Contributor

anchorDate becomes a little tricker still in that it's probably passed positionally in a lot of places. Deprecation works the same way it ever would, but it's mildly cruel, in that the new name has to go on the end first, then jump to the front.

def function(var1, deprecatedVar, var3, var4, renamed_var):

throws a deprecation warning on deprecatedVar for a few months or pending a "breaking" version number. Then, it becomes

def function(var1, renamed_var, var3, var4):

I don't think there's a better way, but it's always an awkward change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants