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).

Attachments (0)

Change History (3)

comment:1 Changed on 01/11/2019 at 11:48:52 PM by rhowell

  • Owner set to rhowell

comment:2 Changed on 01/14/2019 at 03:38:04 PM by abpbot

comment:3 Changed on 01/14/2019 at 03:39:56 PM by rhowell

  • Resolution set to fixed
  • Status changed from new to closed

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from rhowell.
 
Note: See TracTickets for help on using tickets.