-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Docstring too long (issue #1632 fix) #3044
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
471babd
Check line length of last line of docstring to decide whether or not …
idorrington92 0cd15a1
Fixing bugs. last_line_length must be 0 for empty strings and we need…
idorrington92 6413776
updating change log
idorrington92 3d27415
Moving change to preview style section
idorrington92 e618a5a
Adding to Preview
idorrington92 bbf6053
added tests for docstrings that go over line limit and one at the lin…
idorrington92 07fc574
Converting to preview
idorrington92 ff75a6f
using preview correctly this time
idorrington92 af631ef
Changing test to fit with using the preview now
idorrington92 06f907a
Adding preview tests and removing from regular test script
idorrington92 ef3e6c3
Putting tests back
idorrington92 ed261cb
Update tests/test_format.py
idorrington92 9923e9c
The logic was slighly wrong. It needed to account for the fact that m…
idorrington92 c52f493
Merge branch 'docstring_too_ling' of https://github.com/idorrington92…
idorrington92 5ff6d8b
renaming preview test file
idorrington92 70b4164
added new test that checks multiline docstrings at the line limit
idorrington92 9e8dc5f
Fixing bug where prefix was sometimes considered in line length when …
idorrington92 cf6700f
Added tests with prefixes
idorrington92 85d5bf9
Fixing comments
idorrington92 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| def docstring_almost_at_line_limit(): | ||
| """long docstring................................................................. | ||
| """ | ||
|
|
||
|
|
||
| def docstring_almost_at_line_limit_with_prefix(): | ||
| f"""long docstring................................................................ | ||
| """ | ||
|
|
||
|
|
||
| def mulitline_docstring_almost_at_line_limit(): | ||
| """long docstring................................................................. | ||
|
|
||
| .................................................................................. | ||
| """ | ||
|
|
||
|
|
||
| def mulitline_docstring_almost_at_line_limit_with_prefix(): | ||
| f"""long docstring................................................................ | ||
|
|
||
| .................................................................................. | ||
| """ | ||
|
|
||
|
|
||
| def docstring_at_line_limit(): | ||
| """long docstring................................................................""" | ||
|
|
||
|
|
||
| def docstring_at_line_limit_with_prefix(): | ||
| f"""long docstring...............................................................""" | ||
|
|
||
|
|
||
| def multiline_docstring_at_line_limit(): | ||
| """first line----------------------------------------------------------------------- | ||
|
|
||
| second line----------------------------------------------------------------------""" | ||
|
|
||
|
|
||
| def multiline_docstring_at_line_limit_with_prefix(): | ||
| f"""first line---------------------------------------------------------------------- | ||
|
|
||
| second line----------------------------------------------------------------------""" | ||
|
|
||
|
|
||
| # output | ||
|
|
||
|
|
||
| def docstring_almost_at_line_limit(): | ||
| """long docstring................................................................. | ||
| """ | ||
|
|
||
|
|
||
| def docstring_almost_at_line_limit_with_prefix(): | ||
| f"""long docstring................................................................ | ||
| """ | ||
|
|
||
|
|
||
| def mulitline_docstring_almost_at_line_limit(): | ||
| """long docstring................................................................. | ||
|
|
||
| .................................................................................. | ||
| """ | ||
|
|
||
|
|
||
| def mulitline_docstring_almost_at_line_limit_with_prefix(): | ||
| f"""long docstring................................................................ | ||
|
|
||
| .................................................................................. | ||
| """ | ||
|
|
||
|
|
||
| def docstring_at_line_limit(): | ||
| """long docstring................................................................""" | ||
|
|
||
|
|
||
| def docstring_at_line_limit_with_prefix(): | ||
| f"""long docstring...............................................................""" | ||
|
|
||
|
|
||
| def multiline_docstring_at_line_limit(): | ||
| """first line----------------------------------------------------------------------- | ||
|
|
||
| second line----------------------------------------------------------------------""" | ||
|
|
||
|
|
||
| def multiline_docstring_at_line_limit_with_prefix(): | ||
| f"""first line---------------------------------------------------------------------- | ||
|
|
||
| second line----------------------------------------------------------------------""" |
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
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.
Uh oh!
There was an error while loading. Please reload this page.