Skip to content

Commit a9f94bf

Browse files
Add ':' and ';' to allowed end of sentence punctuation (#52)
1 parent a4fa470 commit a9f94bf

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

pydocstringformatter/formatting/formatter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class FinalPeriodFormatter(StringAndQuotesFormatter):
6565
"""Add a period to the end of single line docstrings and summaries."""
6666

6767
name = "final-period"
68-
END_OF_SENTENCE_PUNCTUATION = {".", "?", "!", "‽"}
68+
END_OF_SENTENCE_PUNCTUATION = {".", "?", "!", "‽", ":", ";"}
6969

7070
def _treat_string(
7171
self,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
def function():
2+
"""Check the name of first argument, expect:
3+
4+
*'self' for a regular method
5+
*'cls' for a class method or a metaclass regular method"""
6+
7+
def function():
8+
"""This has peculiar line ending;
9+
10+
but it should not matter.
11+
"""
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
def function():
2+
"""Check the name of first argument, expect:
3+
4+
*'self' for a regular method
5+
*'cls' for a class method or a metaclass regular method
6+
"""
7+
8+
def function():
9+
"""This has peculiar line ending;
10+
11+
but it should not matter.
12+
13+
"""

0 commit comments

Comments
 (0)