Skip to content

Commit ab7aa1e

Browse files
committed
One final check
1 parent 57788a4 commit ab7aa1e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pydocstringformatter/formatting/formatter.py

+2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ class FinalPeriodFormatter(SummaryFormatter):
8686
def _treat_summary(self, summary: str, indent_length: int) -> str:
8787
"""Add a period to the end of single-line docstrings and summaries."""
8888
if summary[-1] in self.END_OF_SENTENCE_PUNCTUATION:
89+
if summary[-1] == "?":
90+
return summary + "."
8991
return summary
9092

9193
# If second line is one recurring character we're dealing with a rst title

0 commit comments

Comments
 (0)