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 2019/10/04 10:31:56 UTC

[GitHub] [airflow] arkadiuszbach commented on a change in pull request #6252: [AIRFLOW-4676] Make airflow/macros Pylint compatible

arkadiuszbach commented on a change in pull request #6252: [AIRFLOW-4676] Make airflow/macros Pylint compatible
URL: https://github.com/apache/airflow/pull/6252#discussion_r331438987
 
 

 ##########
 File path: airflow/macros/__init__.py
 ##########
 @@ -91,4 +92,4 @@ def _integrate_plugins():
     from airflow.plugins_manager import macros_modules
     for macros_module in macros_modules:
         sys.modules[macros_module.__name__] = macros_module
-        globals()[macros_module._name] = macros_module
+        globals()[macros_module.__name__.split('.')[-1]] = macros_module
 
 Review comment:
   It is used only in the following five [inits](https://github.com/apache/airflow/search?q=_integrate_plugins&unscoped_q=_integrate_plugins) in order to integrate plugins:
   
   - [macros](https://github.com/apache/airflow/blob/88989200a66291580088188f06a6db503ac823e2/airflow/macros/__init__.py)
   - [operators](https://github.com/apache/airflow/blob/5c7e4e4e9c2014a78830a81162532c0f2eecd6e4/airflow/operators/__init__.py)
   - [sensors](https://github.com/apache/airflow/blob/5c7e4e4e9c2014a78830a81162532c0f2eecd6e4/airflow/sensors/__init__.py)
   - [hooks](https://github.com/apache/airflow/blob/88989200a66291580088188f06a6db503ac823e2/airflow/hooks/__init__.py)
   - [executors](https://github.com/apache/airflow/blob/88989200a66291580088188f06a6db503ac823e2/airflow/executors/__init__.py)
   
   We could change ```_name``` to ```name```

----------------------------------------------------------------
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