-
Notifications
You must be signed in to change notification settings - Fork 769
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
Indented regions in docstrings are highlighted as code #83
Comments
Can you please provide an example? This may be a case where the code is indented and being treated as a code block, similar to: #48 |
I don't have the required environment just right now, but AFAICR |
|
There are many many docstrings with indented natural language, please see my comment #41 (comment). |
Which comes from the """Create a new hashing object and return it.
key: bytes or buffer, The starting key for the hash.
msg: bytes or buffer, Initial input for the hash, or None.
digestmod: A hash name suitable for hashlib.new(). *OR*
A hashlib constructor returning a new hash object. *OR*
A module supporting PEP 247.
Required as of 3.8, despite its position after the optional
msg argument. Passing it as a keyword argument is
recommended, though not required for legacy API reasons.
You can now feed arbitrary bytes into the object using its update()
method, and can ask for the hash value at any time by calling its digest()
or hexdigest() methods.
""" |
The next release includes a few docstring improvements which should resolve this for a few different docstring styles, including numpy/google/sphinx styles. |
Just to give a preview ahead of the next release, this is
And a few others: (@bschnurr deserves all of the credit for this 😄) |
This issue has been fixed in version 2021.2.0, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#202120-3-february-2021 |
Environment data
Expected behaviour
Python highlighting isn't applied to natural language.
Actual behaviour
Lots of usual words (and, or, is, etc) are colorized in docstrings.
The text was updated successfully, but these errors were encountered: