Opened on 01/10/2019 at 09:14:09 AM
Closed on 01/14/2019 at 03:39:56 PM
#7205 closed change (fixed)
[python-abp] Change classes that use ALL_CAPS naming to be CamelCase as recommended by PEP8
Reported by: | kvas | Assignee: | rhowell |
---|---|---|---|
Priority: | P3 | Milestone: | |
Module: | Sitescripts | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | yes | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description
Background
In python-abp we have several classes that are used as namespaces for constants (example). Their names follow ALL_CAPS convention to indicate this special usage and produce ALL_CAPS names of constants like FILTER_OPTION.IMAGE. Naming classes in ALL_CAPS contradicts PEP8 and we have to bypass flake8 checking for those lines.
We have recently created attempted to make ALL_CAPS class names allowed, at least for the cases when the class contains just constants (ticket). However, the maintainers of pep8-naming refused the ticket stating that our usage is not conventional and that, for example, the documentation of Enum class in Python 3, that fulfils a very similar purpose, follows CamelCase for class names (so constant names look like FilterOption.IMAGE).
What to change
Change the names of the constant namespace classes in parser.py to follow CamelCase convention and update the references (export list of that module and any imports and use in other modules).
A commit referencing this issue has landed:
Issue 7205 - Change classes that use ALL_CAPS naming to be CamelCase