mik-laj commented on a change in pull request #4829: [AIRFLOW-3993] Add tests for salesforce hook URL: https://github.com/apache/airflow/pull/4829#discussion_r263173189
########## File path: airflow/contrib/hooks/salesforce_hook.py ########## @@ -18,127 +18,109 @@ # under the License. # """ -This module contains a Salesforce Hook -which allows you to connect to your Salesforce instance, -retrieve data from it, and write that data to a file -for other uses. +This module contains a Salesforce Hook which allows you to connect to your Salesforce instance, +retrieve data from it, and write that data to a file for other uses. -NOTE: this hook also relies on the simple_salesforce package: - https://github.com/simple-salesforce/simple-salesforce +.. note:: this hook also relies on the simple_salesforce package: + https://github.com/simple-salesforce/simple-salesforce """ -from simple_salesforce import Salesforce -from airflow.hooks.base_hook import BaseHook - -import json +import time import pandas as pd -import time +from simple_salesforce import Salesforce +from airflow.hooks.base_hook import BaseHook from airflow.utils.log.logging_mixin import LoggingMixin class SalesforceHook(BaseHook): - def __init__( - self, - conn_id, - *args, - **kwargs - ): + def __init__(self, conn_id): Review comment: this is only for operators. it makes it easier to create DAGs ---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
