-
-
Notifications
You must be signed in to change notification settings - Fork 239
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
ops.py: cleanup / consistency: remove redundant docstring newline markers #1219
ops.py: cleanup / consistency: remove redundant docstring newline markers #1219
Conversation
…n method call-arguments, and make two example queries more similar
The docstring here provides a sample case that could be useful for #1218 (in-progress), so I'm going to move this pull request into a draft status too. |
Hi, if we change that part we should probably format the text using black. |
I'm thinking of merging this in https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/4561, so we have a single patch |
@CaselIT that's OK with me 👍 If you have suggestions for additional ways to provide test coverage for the script, let me know and I'll take a look. I'm still learning about |
these are cython files, and should only be on sqlalchemy side. there is no performance sensitive code on alembic :) |
Self-replying:
Thinking about this more over the past day or so: I suppose the fact that the I'm also thinking about going through some of the code samples within docstrings in the codebase to apply |
Note: doing this could require some care, because there are cases where multiline strings are used within the sample code snippets (in other words: if we're using I'm experimenting with this locally to see whether it produces sensible results. |
by multiline strings you mean a single text that spans multiple python line, but that does not include |
The second one, I think. For example: alembic/alembic/autogenerate/api.py Lines 69 to 79 in d3f869b
If reformatting those using |
It's maybe simple in these case to format with black then re-convert |
### Description This is a pedantic/consistency follow-up from #1219: that change applied some `black` formatting to two code snippets, and this change applies that formatting to the remaining snippets in the codebase. For each snippet, I extracted the code and applied formatting using `black` v23.1.0, then placed the results back into the source. In one case there was an associated 'output' block, and in that case I re-ran the snippet code to update the results of that output too (this included a [change-in-output](https://github.com/sqlalchemy/alembic/compare/main...openculinary:alembic:docstrings/snippet-format-consistency?expand=1#diff-bf4756660cdb31ee8566a2cff72526671356c38a725195723ce0e65e6c11e6cfR124) thanks to a [bugfix since the snippet was written](bc6971a), by the looks of it). ### Checklist This pull request is: - [x] A documentation / typographical error fix Closes: #1220 Pull-request: #1220 Pull-request-sha: cd65a45 Change-Id: I6758445633c364c8fb2f4d8376d83607430a36d6
Description
Potential (nitpicky) docstring cleanup discovered while preparing #1218.
Checklist
This pull request is: