Skip to content

Commit

Permalink
squash! Implement Enums for Role and State constants in controlTypes (#…
Browse files Browse the repository at this point in the history
…12510)

- update coding standards for enum usage
  • Loading branch information
seanbudd committed Jun 25, 2021
1 parent fb4b8ad commit 02785b9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions devDocs/codingStandards.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ for more information.
- E.G. `BrailleHandler`.
* Constants should be all upper case, separating words with underscores;
- E.G. `LANGS_WITH_CONJUNCT_CHARS`.
- Avoid unnecesary shared prefixes in constants. Instead, use an enum for related constants.
* Event handlers are prefixed with "event_", subsequent words in camel case.
Note, `object` and `action` are separated by underscores.
- E.G.: `event_action` or `event_object_action`.
Expand All @@ -59,6 +60,13 @@ for more information.
- TBD. Ideally follows a similar style the others, and communicates if the filtering happens
before or after some action.
- It would also be nice to have a naming scheme that differentiates it from the others.
* Enums should be formatted using the expected mix of above eg:
```python
class ExampleGroupOfData(Enum):
CONSTANT_VALUE_MEMBER = auto()
@property
def _formatMember(self): pass
```

### Translatable Strings
* All strings that could be presented to the user should be marked as translatable using the `_()`
Expand Down

0 comments on commit 02785b9

Please sign in to comment.