-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtags.py
33 lines (26 loc) · 1.3 KB
/
tags.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# The following lines should all be highlighted as tags:
"""
:param: This tag has no value
:param a: This tag's value is a single char
:param a b: This tag has two values
:param float value: This tag has type information
:param p1: Ends in a number.
:param dict_: Ends in an underscore.
:param dict\\_: Ends in an escaped underscore.
:param *args: Starts with an asterisk.
:param \\*args: Starts with an escaped asterisk.
:param **kwargs: Starts with two asterisks.
:param \\*\\*kwargs: Starts with two escaped asterisks.
:param _test: Starts with an underscore.
:param \\_test: Starts with an escaped underscore.
:param __test: Starts with two underscores.
:param \\__test: Starts with two escaped underscores.
"""
# The following tags should not be highlighted:
"""
:param 123: Integer literal.
:param 1.0: Float literal.
:param 1two3: Starts with a numeric character.
:param 'value': This parameter contains quotes.
:meth:`MyClass.method` This is a reference and not a tag.
"""