-
Notifications
You must be signed in to change notification settings - Fork 119
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 strict PascalCase for class names #182
Comments
CC @anderskaplan. |
This makes it more practical when compound class names are introduced. For backwards compatibility, we also introduce aliases for the old names, marking them as deprecated.
This makes it more practical when compound class names are introduced. For backwards compatibility, we also introduce aliases for the old names, marking them as deprecated.
This makes it more practical when compound class names are introduced. For backwards compatibility, we also introduce aliases for the old names, marking them as deprecated.
Not impressed by this change. PEP-8 says:
Meanwhile, this is a hard-breaking change for anyone who uses |
Backwards compatibility was actually broken in #182 inadvertently - it didn't cover the case when the old `HTMLRenderer` was imported directly from the `mistletoe` package. Note: The `# noqa: F401` comment is for the flake8 linter, it suppresses the `imported but unused` rule.
@pydsigner, thanks for letting us know and sorry for the inconvenience! I have just released v1.2.1 where Regarding the change to "strict PascalCase" itself, you are right that PEP-8 suggests the other way. AFAIK in C-style languages (which Python isn't, I know ;)), |
The historically used "lenient" usage of the PascalCase (pascal case) convention in mistletoe is quite impractical when it comes to introducing more complex names. I suggest here to use the strict variant which doesn't have this problem and leads to a more consistent code base.
E.g. change
HTMLRenderer
toHtmlRenderer
,HTMLBlock
toHtmlBlock
.For backwards compatibility, we can introduce aliases for the old names, marking them as deprecated.
The text was updated successfully, but these errors were encountered: