Python docstrings
See original GitHub issueUntil recently I could differentiate between python docstrings and normal strings within the code. I’m not sure if a change in VSCode on in your extension changed this behaviour.
I want to have docstrings in the same colour as comments, like so:
but now the opening and closing quotes of normal strings also get the same tokenisation:
(please see the quotes with a mismatch colour: I would like them to be green (same as the string is) while the ones on the docstring remain grey).
This used to be my textMate rule for that scope:
{
"name": "Python - Docstrings",
"scope": [
"string.quoted.docstring.multi.python",
"string.quoted.docstring.multi.python punctuation.definition.string.begin.python",
"string.quoted.docstring.multi.python punctuation.definition.string.end.python",
],
"settings": {
"fontStyle": "italic",
"foreground": "#7c7a7a"
}
},
But it’s not working anymore.
Am I missing anything or is this a change on VSCode’s site or your extension?
Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
PEP 257 – Docstring Conventions
A docstring is a string literal that occurs as the first statement in a module, function, class, or method definition. · All modules...
Read more >Python Docstrings (With Examples) - Programiz
Python docstrings are the string literals that appear right after the definition of a function, method, class, or module. Let's take an example....
Read more >How to Use Python Docstrings for Effective Code Documentation
At the top of the file, a docstring should describe the main purpose of the script, brief guidelines, and functions or classes it...
Read more >Python Docstrings Tutorial : Examples & Format for Pydoc ...
Python documentation string or commonly known as docstring, is a string literal, and it is used in the class, module, function, or method...
Read more >pandas docstring guide — pandas 1.5.2 documentation
A Python docstring is a string used to document a Python module, class, function or method, so programmers can understand what it does...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, this is it! Absolutely brilliant, thanks so much for fixing this and so quickly! 💯
please check v3.13.7, and give me some feedback if you can~