BasPH commented on a change in pull request #4101: add base grpc hook
URL: https://github.com/apache/incubator-airflow/pull/4101#discussion_r228719963
 
 

 ##########
 File path: airflow/contrib/hooks/grpc_hook.py
 ##########
 @@ -0,0 +1,102 @@
+# -*- coding: utf-8 -*-
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from airflow.hooks.base_hook import BaseHook
+from airflow.exceptions import AirflowException
+import grpc
+from google import auth as google_auth
+from google.auth import jwt as google_auth_jwt
+from google.auth.transport import grpc as google_auth_transport_grpc
+
 
 Review comment:
   Could you group imports like this:
   ```python
   import grpc
   from google import auth as google_auth
   from google.auth import jwt as google_auth_jwt
   from google.auth.transport import grpc as google_auth_transport_grpc
   
   from airflow.hooks.base_hook import BaseHook
   ```
   
   PEP8 convention is to group imports by (1) stdlib, (2) 3rd party imports and 
(3) local imports (see 
[here](https://www.python.org/dev/peps/pep-0008/#imports)).

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


With regards,
Apache Git Services

Reply via email to