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

Fix Color Pop-In Bug #42

Merged
merged 2 commits into from
Nov 3, 2016
Merged

Fix Color Pop-In Bug #42

merged 2 commits into from
Nov 3, 2016

Conversation

justinmc
Copy link
Contributor

@justinmc justinmc commented Nov 3, 2016

See issue: #39

)

# Returns new styles after updating the given atoms with the given color
def get_styles_for_color(self, color, atoms, styles):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This instance method doesn't use self. Is that usually ok in Python? Should I make it a class method, or move it to some other file outside of a class altogether?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is fine; it's a actually a staticmethod (in python, a classmethod is one that gets the class as the first argument). So you can write this as

@staticmethod
def get_styles_for_color(color, atoms, styles):

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok got it, I'll make this change really quick because it bothered me.

@justinmc
Copy link
Contributor Author

justinmc commented Nov 3, 2016

@avirshup Needs review please!

@avirshup
Copy link
Contributor

avirshup commented Nov 3, 2016

👍 fix confirmed, code looks good 👍

@justinmc justinmc merged commit 37b82da into master Nov 3, 2016
@justinmc justinmc deleted the color-popin branch November 3, 2016 21:45
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

Successfully merging this pull request may close these issues.

2 participants