Closed
Conversation
scbedd
reviewed
Nov 1, 2022
scbedd
reviewed
Nov 1, 2022
scbedd
reviewed
Nov 1, 2022
| name = s[0].strip() | ||
| snippet = s[1] | ||
| # Remove extra spaces | ||
| spaces = "" |
Member
There was a problem hiding this comment.
I'd really appreciate a little code comment or something that maps out what is actually happening here. I am not convinced of this code as-is just from reading it.
A snippet is the complete code from the actual python file. So ripped directly from the python file it'll look like.
# [START trio]
from azure.core.pipeline.transport import TrioRequestsTransport
async with AsyncPipeline(TrioRequestsTransport(), policies=policies) as pipeline:
return await pipeline.run(request)
# [END trio]
And we need to remove spaces, as we will be emplacing the snippet into the markdown file.
First question, why do we start with the second character of the snippet? Shouldn't we start with the first?
if snippet[-1] == "\n":
snippet = snippet[:-1]
I seriously do not get it.
scbedd
requested changes
Nov 1, 2022
Member
Author
|
Close the PR and use Azure/azure-sdk-for-python#26899 to track the code change. |
This file contains hidden or 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
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.
No description provided.