You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/03/25 23:41:32 UTC

[GitHub] [airflow] zeroam commented on a change in pull request #7873: Add help message in celery command

zeroam commented on a change in pull request #7873: Add help message in celery command
URL: https://github.com/apache/airflow/pull/7873#discussion_r398236137
 
 

 ##########
 File path: airflow/cli/cli_parser.py
 ##########
 @@ -55,6 +56,28 @@ def command(*args, **kwargs):
     return command
 
 
+class DefaultHelpParser(argparse.ArgumentParser):
+    """CustomParser to display help message"""
+    custom_msg = {'celery': 'celery command cab be used in CeleryExcutor'}
+
+    def _check_value(self, action, value):
+        """Override _check_value and check conditionally added command"""
+        if action.choices is not None and value not in action.choices:
+            args = {'value': value,
 
 Review comment:
   I agree

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services