summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-12-21 20:13:48 +0100
committerGitHub <noreply@github.com>2021-12-21 20:13:48 +0100
commit45b5e7ba3ae3d3fdca3ef0eccdae715986069cee (patch)
treea3bae4df85c789a9fc5b901e0d9b7797279715e7
parent996da9ef9b6ce3cdefaa35afbb2550c5f795c635 (diff)
downloadpylint-git-45b5e7ba3ae3d3fdca3ef0eccdae715986069cee.tar.gz
Add missing method to ``_ManHelpFormatter`` (#5577)
Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>
-rw-r--r--pylint/config/man_help_formatter.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pylint/config/man_help_formatter.py b/pylint/config/man_help_formatter.py
index b265d654c..e8e019824 100644
--- a/pylint/config/man_help_formatter.py
+++ b/pylint/config/man_help_formatter.py
@@ -6,7 +6,6 @@ import sys
import time
-# pylint: disable=abstract-method; by design?
class _ManHelpFormatter(optparse.HelpFormatter):
def __init__(
self, indent_increment=0, max_help_position=24, width=79, short_first=0
@@ -107,6 +106,10 @@ Please report bugs on the project\'s mailing list:
"""
return tail
+ def format_usage(self, usage):
+ """Taken from optparse.IndentedHelpFormatter"""
+ return f"Usage: {usage}\n"
+
def _generate_manpage(optparser, pkginfo, section=1, stream=sys.stdout, level=0):
formatter = _ManHelpFormatter()