Skip to content

Commit b80aca7

Browse files
committed
Add the ability for Command subclasses to block help
1 parent 642dd85 commit b80aca7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

flask_script/commands.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ class Command(object):
9393
"""
9494

9595
option_list = []
96+
add_help = True
9697

9798
@property
9899
def description(self):
@@ -115,7 +116,7 @@ def get_options(self):
115116
def create_parser(self, *args, **kwargs):
116117

117118
func_stack = kwargs.pop('func_stack',())
118-
parser = argparse.ArgumentParser(*args, **kwargs)
119+
parser = argparse.ArgumentParser(*args, add_help=self.add_help, **kwargs)
119120

120121
for option in self.get_options():
121122
if isinstance(option, Group):

0 commit comments

Comments
 (0)