Skip to content

Commit

Permalink
Indicate feature toggle optional fields
Browse files Browse the repository at this point in the history
This helps get the code annotations linter pass on edx-platform.
  • Loading branch information
regisb committed Jan 21, 2021
1 parent 315f9e1 commit 1a16646
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
10 changes: 7 additions & 3 deletions code_annotations/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,10 @@ def check_results(self, all_results):

def iter_groups(self, annotations):
"""
Iterate on groups of annotations. Annotations are considered as a group when they all have the same
`line_number`, which should point to the beginning of the annotation group.
Iterate on groups of annotations.
Annotations are considered as a group when they all have the same `line_number`, which should point to the
beginning of the annotation group.
Yield:
annotations (annotation list)
Expand All @@ -468,7 +470,9 @@ def iter_groups(self, annotations):

def check_group(self, annotations):
"""
Perform several linting checks on a group of annotations:
Perform several linting checks on a group of annotations.
The following checks are performed:
- Choice fields should have a valid value
- Annotation tokens are valid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ annotations:
choices: [temporary, circuit_breaker, vip, opt_out, opt_in, open_edx]
- ".. toggle_creation_date:":
- ".. toggle_target_removal_date:":
optional: true
- ".. toggle_warnings:":
optional: true
- ".. toggle_tickets:":
optional: true
extensions:
python:
- py
Expand Down

0 comments on commit 1a16646

Please sign in to comment.