-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python: Highlight attribute docstrings #20763
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We require contributors to sign our Contributor License Agreement, and we don't have @JaagupAverin on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
@cla-bot check |
cla-bot
bot
added
the
cla-signed
The user has signed the Contributor License Agreement
label
Nov 16, 2024
The cla-bot has been summoned, and re-checked this pull request! |
maxdeviant
changed the title
python: Highlight attribute docstrings and add triple-quote closing.
python: Highlight attribute docstrings and add triple-quote closing
Nov 16, 2024
MrSubidubi
reviewed
Nov 16, 2024
This reverts commit 9ccb5a1.
JaagupAverin
changed the title
python: Highlight attribute docstrings and add triple-quote closing
python: Highlight attribute docstrings
Nov 16, 2024
1 task
osiewicz
reviewed
Nov 19, 2024
Co-authored-by: Piotr Osiewicz <[email protected]>
Thanks! |
Anthony-Eid
pushed a commit
to Anthony-Eid/zed
that referenced
this pull request
Nov 22, 2024
Adds more docstring highlights missing from zed-industries#20486. [PEP257](https://peps.python.org/pep-0257/) defines attribute docstrings as > String literals occurring immediately after a simple assignment at the top level of a module, class, or __init__ method are called “attribute docstrings”. This PR adds `@string.doc` for such cases. Before: ![Screenshot_20241116_162257](https://github.com/user-attachments/assets/6b471cff-717e-4755-9291-d596da927dc6) After: ![Screenshot_20241116_162457](https://github.com/user-attachments/assets/96674157-9c86-45b6-8ce9-e433ca0ae8ea) Release Notes: - Added Python syntax highlighting for attribute docstrings. --------- Co-authored-by: Piotr Osiewicz <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds more docstring highlights missing from #20486.
PEP257 defines attribute docstrings as
This PR adds
@string.doc
for such cases.Before:
After:
Release Notes: