jfmontanaro and Piotr Osiewicz
bb59e7f217
Refine syntax highlighting for Python docstrings ( #20898 )
...
Following up on #20763 , this PR adds support for module- and class-level
docstrings, adds "additional docstrings" as described in [PEP
257](https://peps.python.org/pep-0257/ ), and fixes function-level
docstrings so that only the first string literal in a function gets
treated as a docstring.
One question that occurs to me is: Would it be good to capture attribute
and additional docstrings differently from regular docstrings? E.g.
`@string.doc.attribute`, `@string.doc.additional`? PEP 257 mentions that
unlike regular docstrings, these docstrings are ignored by the
interpreter (regular docstrings get added as the `__doc__` property of
the object they document), so I can see someone potentially wanting to
style them a little differently.
Release notes:
* Added Python syntax highlighting for class- and module-level
docstrings, additional docstrings, and improved recognition of
function-level docstrings.
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com >
2025-01-28 10:23:43 +01:00
..
2025-01-27 04:00:27 +00:00
2025-01-26 03:02:45 +00:00
2025-01-26 03:02:45 +00:00
2025-01-27 21:56:29 +00:00
2025-01-27 20:26:34 -03:00
2025-01-27 21:56:29 +00:00
2025-01-27 13:40:59 -05:00
2025-01-26 03:02:45 +00:00
2025-01-27 04:00:27 +00:00
2025-01-26 03:02:45 +00:00
2025-01-26 03:02:45 +00:00
2025-01-26 03:02:45 +00:00
2025-01-26 23:37:34 +00:00
2025-01-26 03:02:45 +00:00
2025-01-27 04:00:27 +00:00
2025-01-27 04:00:27 +00:00
2025-01-27 04:00:27 +00:00
2025-01-26 03:02:45 +00:00
2025-01-27 04:00:27 +00:00
2025-01-17 17:39:22 +01:00
2025-01-28 10:37:56 +02:00
2025-01-27 04:00:27 +00:00
2025-01-17 17:39:22 +01:00
2025-01-27 04:00:27 +00:00
2025-01-26 03:02:45 +00:00
2025-01-26 23:37:34 +00:00
2025-01-26 03:02:45 +00:00
2025-01-27 21:56:29 +00:00
2025-01-26 03:02:45 +00:00
2025-01-27 13:40:59 -05:00
2025-01-27 04:00:27 +00:00
2025-01-26 03:02:45 +00:00
2025-01-28 10:47:11 +02:00
2025-01-26 23:37:34 +00:00
2025-01-26 03:02:45 +00:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-26 23:37:34 +00:00
2025-01-27 04:00:27 +00:00
2025-01-26 03:02:45 +00:00
2025-01-27 18:17:43 -05:00
2025-01-27 04:00:27 +00:00
2025-01-26 03:02:45 +00:00
2025-01-17 17:39:22 +01:00
2025-01-26 03:02:45 +00:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-27 18:11:15 -08:00
2025-01-26 03:02:45 +00:00
2025-01-27 04:00:27 +00:00
2025-01-27 21:56:29 +00:00
2025-01-17 17:39:22 +01:00
2025-01-28 15:48:43 +08:00
2025-01-27 21:56:29 +00:00
2025-01-26 03:02:45 +00:00
2025-01-17 17:39:22 +01:00
2025-01-26 03:02:45 +00:00
2025-01-26 03:02:45 +00:00
2025-01-26 03:02:45 +00:00
2025-01-27 21:56:29 +00:00
2025-01-26 23:37:34 +00:00
2025-01-26 03:02:45 +00:00
2025-01-27 16:38:03 +00:00
2025-01-26 23:37:34 +00:00
2025-01-27 13:40:59 -05:00
2025-01-27 12:29:08 -03:00
2025-01-27 13:40:59 -05:00
2025-01-27 04:00:27 +00:00
2025-01-27 04:00:27 +00:00
2025-01-28 10:23:43 +01:00
2025-01-26 23:37:34 +00:00
2025-01-26 03:02:45 +00:00
2025-01-17 17:39:22 +01:00
2025-01-26 03:02:45 +00:00
2025-01-26 23:37:34 +00:00
2025-01-27 04:00:27 +00:00
2025-01-27 04:00:27 +00:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-27 23:05:46 -07:00
2025-01-17 17:39:22 +01:00
2025-01-27 04:00:27 +00:00
2025-01-26 03:02:45 +00:00
2025-01-27 14:44:12 +00:00
2025-01-27 04:00:27 +00:00
2025-01-27 04:00:27 +00:00
2025-01-27 12:32:22 +01:00
2025-01-27 04:00:27 +00:00
2025-01-26 23:37:34 +00:00
2025-01-28 11:18:00 +02:00
2025-01-28 10:42:10 +02:00
2025-01-27 04:00:27 +00:00
2025-01-27 21:56:29 +00:00
2025-01-28 10:37:56 +02:00
2025-01-27 04:00:27 +00:00
2025-01-23 16:10:38 -05:00
2025-01-26 03:02:45 +00:00
2025-01-26 23:37:34 +00:00
2025-01-27 04:00:27 +00:00
2025-01-27 04:00:27 +00:00
2025-01-26 03:02:45 +00:00
2025-01-26 03:02:45 +00:00
2025-01-25 19:24:19 +00:00
2025-01-26 23:37:34 +00:00
2025-01-27 21:56:29 +00:00
2025-01-27 04:00:27 +00:00
2025-01-17 17:39:22 +01:00
2025-01-26 03:02:45 +00:00
2025-01-26 23:37:34 +00:00
2025-01-26 03:02:45 +00:00
2025-01-26 03:02:45 +00:00
2025-01-27 12:32:22 +01:00
2025-01-27 04:00:27 +00:00
2025-01-26 03:02:45 +00:00
2025-01-17 17:39:22 +01:00
2025-01-26 03:02:45 +00:00
2025-01-27 04:00:27 +00:00
2025-01-17 17:39:22 +01:00
2025-01-24 14:18:22 -07:00
2025-01-26 23:37:34 +00:00
2025-01-26 03:02:45 +00:00
2025-01-27 04:00:27 +00:00
2025-01-26 03:02:45 +00:00
2025-01-26 23:37:34 +00:00
2025-01-17 17:39:22 +01:00
2025-01-17 17:39:22 +01:00
2025-01-26 03:02:45 +00:00
2025-01-27 04:00:27 +00:00
2025-01-27 18:11:15 -08:00
2025-01-26 03:02:45 +00:00
2025-01-26 03:02:45 +00:00
2025-01-26 03:02:45 +00:00
2025-01-27 04:00:27 +00:00
2025-01-17 17:39:22 +01:00
2025-01-26 03:02:45 +00:00
2025-01-27 04:00:27 +00:00
2025-01-27 13:40:59 -05:00
2025-01-26 03:02:45 +00:00
2025-01-26 03:02:45 +00:00
2025-01-26 14:56:07 +08:00
2025-01-27 04:00:27 +00:00
2025-01-27 23:13:13 -07:00
2025-01-26 03:02:45 +00:00
2025-01-27 04:00:27 +00:00
2025-01-27 23:11:35 -07:00
2025-01-28 11:18:00 +02:00
2025-01-28 11:10:00 +02:00
2025-01-26 03:02:45 +00:00
2025-01-27 04:00:27 +00:00
2025-01-26 23:37:34 +00:00