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/08/29 03:29:32 UTC

[GitHub] [airflow] mik-laj commented on a change in pull request #10638: Simplify load connection in LocalFilesystemBackend

mik-laj commented on a change in pull request #10638:
URL: https://github.com/apache/airflow/pull/10638#discussion_r479601274



##########
File path: airflow/secrets/local_filesystem.py
##########
@@ -235,33 +235,33 @@ def load_variables(file_path: str) -> Dict[str, str]:
     return variables
 
 
-def load_connections(file_path: str):
+def load_connections(file_path: str) -> Dict[str, Any]:
     """
     Load connection from text file.
 
     Both ``JSON`` and ``.env`` files are supported.
 
     :return: A dictionary where the key contains a connection ID and the value contains a list of connections.
-    :rtype: Dict[str, List[airflow.models.connection.Connection]]
+    :rtype: Dict[str, airflow.models.connection.Connection]

Review comment:
       This is the most important part. This function does not need to return a list. because conn_id is unique.




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