Defining TODO Patterns and Filters
TODO items in the source code are defined by a certain pattern.
Whenever a pattern is changed, or a new pattern is added, PyCharm Edu scans the whole project and rebuilds the index of TODO items. Results display in the TODO tool window, as described in the section Viewing TODO Items.
By default, PyCharm Edu provides two patterns:
A generic pattern looks like
You might want to view the TODO comments of certain a type, and hide the others. For this purpose, PyCharm Edu suggests to use filters. This way you can show those items that match certain patterns only.
To define a TODO pattern
- Open the TODO page of the Settings dialog.
- In the Patterns section, click the Add button to create a new pattern, or the Edit button to update an existing one. The Add/Edit Pattern dialog opens.
- In the Pattern field, enter the regular expression that describes the desired pattern.
- In the Icon list, select the desired icon that will mark the matching TODO items in the TODO tool window.
- Specify the color and font properties, which PyCharm Edu will use to highlight the matching comments in the source code.
- Select the Case sensitive checkbox, if you want the pattern to be case-sensitive.