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 capitalization for class names #1

Closed
friedererdmann opened this issue Jan 14, 2022 · 2 comments
Closed

Fix capitalization for class names #1

friedererdmann opened this issue Jan 14, 2022 · 2 comments

Comments

@friedererdmann
Copy link
Owner

Currently inheritance can break between classes as classes might be capitalized or not. This leads to classes inheriting from Color but the class color was not capitalized. By default all class names should be CamelCased, also to avoid clashes with built-ins (like set and Set).

@friedererdmann
Copy link
Owner Author

Also: property names need to be lower case to avoid name clashes with class names.

@friedererdmann
Copy link
Owner Author

Fixed in 0de562a

  • Classes are now CamelCase or at least Titlecase (upper case letters always win, so favoring CamelCase)
  • Methods are now lowercase
  • Attributes are now UPPERCASE
    • A fair amount of attributes clashed with python keywords if they were lowercase
    • Easier to distinguish methods and attributes at a glance

Might follow up with a specialty rule to change cases where methods might clash with keywords (currently they are removed, but might rename them to avoid naming clash instead).

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