Skip to content

Commit 48aa182

Browse files
🎨 Update syntax highlighting for variables in Google, NumPy, and Sphinx syntaxes.
1 parent f244054 commit 48aa182

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

‎syntaxes/google.tmLanguage.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"name": "punctuation.definition.tag.end.docstring.python, docstring.variable.end.google.python"
1818
}
1919
},
20-
"match": "(?:^\\s*)()((?:\\*\\*|\\*|_*)?[a-z]\\w*)((?:\\s\\(.*\\))?:)(?=\\s+\\S+\\s+\\S+)",
20+
"match": "(?:^\\s*)()((?:\\*\\*|\\*|_*)?[a-z]\\w*)((?:\\s\\(.*\\))?:)(?=\\s)",
2121
"name": "docstring.variable.google.python"
2222
},
2323
{
@@ -33,7 +33,7 @@
3333
"name": "punctuation.definition.tag.end.docstring.python, docstring.type.end.google.python"
3434
}
3535
},
36-
"match": "(?<=\"{3}|\\'{3})()([^\\s:]+)(:)(?:\\s)",
36+
"match": "(?<=\"{3}|\\'{3})()([^\\s:]+)(:)(?=\\s)",
3737
"name": "docstring.type.google.python"
3838
}
3939
],

‎syntaxes/numpy.tmLanguage.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"name": "punctuation.definition.tag.end.docstring.python, docstring.type.end.numpy.python"
3434
}
3535
},
36-
"match": "(?<=\"{3}|\\'{3})()([^\\s:]+)(:)(?:\\s)",
36+
"match": "(?<=\"{3}|\\'{3})()([^\\s:]+)(:)(?=\\s)",
3737
"name": "docstring.type.numpy.python"
3838
}
3939
],

‎syntaxes/sphinx.tmLanguage.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"name": "punctuation.definition.tag.end.docstring.python, docstring.variable.end.sphinx.python"
2424
}
2525
},
26-
"match": "(?:^\\s*)(:)(\\w+)(?:(\\s|(?:.*\\s))?((?:\\*\\*|\\*|_)?\\w*)?)((?:=[^:]+)?:)(?:\\s)",
26+
"match": "(?:^\\s*)(:)(\\w+)(?:(\\s|(?:.*\\s))?((?:\\*\\*|\\*|_)?\\w*)?)((?:=[^:]+)?:)(?=\\s)",
2727
"name": "docstring.variable.sphinx.python"
2828
},
2929
{
@@ -39,7 +39,7 @@
3939
"name": "punctuation.definition.tag.end.docstring.python, docstring.type.end.sphinx.python"
4040
}
4141
},
42-
"match": "(?<=\"{3}|\\'{3})()([^\\s:]+)(:)(?:\\s)",
42+
"match": "(?<=\"{3}|\\'{3})()([^\\s:]+)(:)(?=\\s)",
4343
"name": "docstring.type.sphinx.python"
4444
}
4545
],

‎tests/google.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def module_level_function(param1, param2=None, *args, **kwargs):
9898
param2 (Optional[str]): The second parameter. Defaults to None.
9999
Second line of description should be indented.
100100
*args: Variable length argument list.
101-
**kwargs: Arbitrary keyword arguments.
101+
**kwargs: Miscellaneous.
102102
103103
Returns:
104104
bool: True if successful, False otherwise.

‎tests/numpy.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def module_level_function(param1, param2=None, *args, **kwargs):
133133
*args
134134
Variable length argument list.
135135
**kwargs
136-
Arbitrary keyword arguments.
136+
Miscellaneous.
137137
138138
Returns
139139
-------

‎tests/sphinx.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def module_level_function(param1, param2=None, *args, **kwargs):
8989
:param int param1: The first parameter.
9090
:param str param2=None: The second parameter.
9191
:param args: Variable length argument list.
92-
:param kwargs: Arbitrary keyword arguments.
92+
:param kwargs: Miscellaneous.
9393
9494
:rtype: bool
9595
:returns: True if successful, False otherwise.

0 commit comments

Comments
 (0)