-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve
SplitSummaryAndDocstringFormatter
(#69)
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
- Loading branch information
1 parent
f01ed1b
commit 26c6f1b
Showing
23 changed files
with
265 additions
and
32 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,7 @@ class MyClass: | |
|
||
|
||
class MyClass: | ||
"""Summary over multiple | ||
"""Summary over multiple. | ||
|
||
lines. | ||
""" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--split-summary-body | ||
--max-summary-lines=2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
class MyClass: | ||
"""We shouldn't split sys.path.""" | ||
|
||
|
||
def func(): | ||
"""We should not add extra lines after the dot | ||
to it. | ||
""" | ||
|
||
|
||
def func(): | ||
"""We should not split for e.g. here.""" | ||
|
||
|
||
def func(): | ||
"""We should not split for i.e. here.""" | ||
|
||
|
||
def func(): | ||
"""We should not add line after i.e., sys.path, e.g., etc. but etc. in particular | ||
is harder right ? | ||
""" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
class MyClass: | ||
"""We shouldn't split sys.path.""" | ||
|
||
|
||
def func(): | ||
"""We should not add extra lines after the dot | ||
to it. | ||
""" | ||
|
||
|
||
def func(): | ||
"""We should not split for e.g. here.""" | ||
|
||
|
||
def func(): | ||
"""We should not split for i.e. here.""" | ||
|
||
|
||
def func(): | ||
"""We should not add line after i.e., sys.path, e.g., etc. but etc. in particular. | ||
|
||
is harder right ? | ||
""" |
2 changes: 2 additions & 0 deletions
2
tests/data/format/summary_splitter/max_summary_lines/max_lines_is_1.args
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--split-summary-body | ||
--max-summary-lines=1 |
8 changes: 8 additions & 0 deletions
8
tests/data/format/summary_splitter/max_summary_lines/max_lines_is_1.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
def func(): | ||
"""My long | ||
summary | ||
is way | ||
too long. | ||
Description | ||
""" |
9 changes: 9 additions & 0 deletions
9
tests/data/format/summary_splitter/max_summary_lines/max_lines_is_1.py.out
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
def func(): | ||
"""My long. | ||
|
||
summary | ||
is way | ||
too long. | ||
|
||
Description | ||
""" |
2 changes: 2 additions & 0 deletions
2
tests/data/format/summary_splitter/max_summary_lines/max_lines_is_2.args
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--split-summary-body | ||
--max-summary-lines=2 |
21 changes: 21 additions & 0 deletions
21
tests/data/format/summary_splitter/max_summary_lines/max_lines_is_2.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
def func(): | ||
"""My long | ||
summary | ||
is way | ||
too long. | ||
Description | ||
""" | ||
|
||
|
||
def func(): | ||
"""A long summary | ||
without a period | ||
""" | ||
|
||
|
||
def func(): | ||
"""A summary. | ||
A body | ||
""" |
22 changes: 22 additions & 0 deletions
22
tests/data/format/summary_splitter/max_summary_lines/max_lines_is_2.py.out
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
def func(): | ||
"""My long | ||
summary | ||
|
||
is way | ||
too long. | ||
|
||
Description | ||
""" | ||
|
||
|
||
def func(): | ||
"""A long summary | ||
without a period | ||
""" | ||
|
||
|
||
def func(): | ||
"""A summary. | ||
|
||
A body | ||
""" |
2 changes: 2 additions & 0 deletions
2
tests/data/format/summary_splitter/max_summary_lines/max_lines_is_3.args
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--split-summary-body | ||
--max-summary-lines=3 |
8 changes: 8 additions & 0 deletions
8
tests/data/format/summary_splitter/max_summary_lines/max_lines_is_3.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
def func(): | ||
"""My long | ||
summary | ||
is way | ||
too long. | ||
Description | ||
""" |
9 changes: 9 additions & 0 deletions
9
tests/data/format/summary_splitter/max_summary_lines/max_lines_is_3.py.out
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
def func(): | ||
"""My long | ||
summary | ||
is way | ||
|
||
too long. | ||
|
||
Description | ||
""" |
1 change: 1 addition & 0 deletions
1
tests/data/format/summary_splitter/max_summary_lines/max_lines_is_default.args
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--split-summary-body |
8 changes: 8 additions & 0 deletions
8
tests/data/format/summary_splitter/max_summary_lines/max_lines_is_default.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
def func(): | ||
"""My long | ||
summary | ||
is way | ||
too long. | ||
Description | ||
""" |
9 changes: 9 additions & 0 deletions
9
tests/data/format/summary_splitter/max_summary_lines/max_lines_is_default.py.out
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
def func(): | ||
"""My long. | ||
|
||
summary | ||
is way | ||
too long. | ||
|
||
Description | ||
""" |
1 change: 1 addition & 0 deletions
1
tests/data/format/summary_splitter/max_summary_lines/max_lines_with_dot.args
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--split-summary-body |
7 changes: 7 additions & 0 deletions
7
tests/data/format/summary_splitter/max_summary_lines/max_lines_with_dot.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
def func(): | ||
"""My long. summary | ||
is way | ||
too long. | ||
Description | ||
""" |
9 changes: 9 additions & 0 deletions
9
tests/data/format/summary_splitter/max_summary_lines/max_lines_with_dot.py.out
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
def func(): | ||
"""My long. | ||
|
||
summary | ||
is way | ||
too long. | ||
|
||
Description | ||
""" |
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