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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to