Skip to content

Commit 1a16646

Browse files
committed
Indicate feature toggle optional fields
This helps get the code annotations linter pass on edx-platform.
1 parent 315f9e1 commit 1a16646

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

code_annotations/base.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,8 +445,10 @@ def check_results(self, all_results):
445445

446446
def iter_groups(self, annotations):
447447
"""
448-
Iterate on groups of annotations. Annotations are considered as a group when they all have the same
449-
`line_number`, which should point to the beginning of the annotation group.
448+
Iterate on groups of annotations.
449+
450+
Annotations are considered as a group when they all have the same `line_number`, which should point to the
451+
beginning of the annotation group.
450452
451453
Yield:
452454
annotations (annotation list)
@@ -468,7 +470,9 @@ def iter_groups(self, annotations):
468470

469471
def check_group(self, annotations):
470472
"""
471-
Perform several linting checks on a group of annotations:
473+
Perform several linting checks on a group of annotations.
474+
475+
The following checks are performed:
472476
473477
- Choice fields should have a valid value
474478
- Annotation tokens are valid

code_annotations/contrib/config/feature_toggle_annotations.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ annotations:
1616
choices: [temporary, circuit_breaker, vip, opt_out, opt_in, open_edx]
1717
- ".. toggle_creation_date:":
1818
- ".. toggle_target_removal_date:":
19+
optional: true
1920
- ".. toggle_warnings:":
21+
optional: true
2022
- ".. toggle_tickets:":
23+
optional: true
2124
extensions:
2225
python:
2326
- py

0 commit comments

Comments
 (0)