feluelle commented on a change in pull request #6740: [AIRFLOW-6181] Add InProcessExecutor URL: https://github.com/apache/airflow/pull/6740#discussion_r354778914
########## File path: airflow/executors/executor_loader.py ########## @@ -51,7 +52,7 @@ def get_default_executor(cls) -> BaseExecutor: return cls._default_executor @staticmethod - def _get_executor(executor_name: str) -> BaseExecutor: + def _get_executor(executor_name: str) -> BaseExecutor: # pylint: disable=too-many-return-statements Review comment: Actually the whole `if` `elif` `else` can be easily simplified by just: ```python if cond: return executor if cond2: return executor2 return executor3 ``` Then I think pylint will also not complain about too many return statements, because it is a common pattern. ---------------------------------------------------------------- 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