8000 Make subparser commands required in Python 3 · kbuschme/irony-detection@2a586bc · GitHub
[go: up one dir, main page]

Skip to content

Commit 2a586bc

Browse files
committed
Make subparser commands required in Python 3
In Python 2 subparser commands are required. From Python 3.3 on they are optional. This is considered a bug and will be reversed in Python 3.7. For details see issues: * 16308: https://bugs.python.org/issue16308 * 9235: https://bugs.python.org/issue9253 and pull request: * 3027: python/cpython#3027
1 parent 06191f9 commit 2a586bc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ def main():
247247
""",
248248
help="Valid commands.",
249249
dest="command",)
250+
subParsers.required = True
250251

251252
# Corpus command parser:
252253
corpusParser = subParsers.add_parser("corpus",

0 commit comments

Comments
 (0)
0