Skip to content

Commit

Permalink
Improve docstrings for various modules (#15047)
Browse files Browse the repository at this point in the history
Update docstring to be consistent with source code params for SQLIntervalCheckOperator and fixes sphinx issue with GoogleAdsListAccountsOperator, among other docstrings.
  • Loading branch information
jlaneve committed Mar 27, 2021
1 parent 28859ca commit 5379698
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
12 changes: 7 additions & 5 deletions airflow/operators/sql.py
Expand Up @@ -253,11 +253,13 @@ class SQLIntervalCheckOperator(BaseSQLOperator):
:type table: str
:param conn_id: the connection ID used to connect to the database.
:type conn_id: str
:param database: name of database which overwrite the defined one in connection
:type database: str
:param database: name of database which will overwrite the defined one in connection
:type database: Optional[str]
:param days_back: number of days between ds and the ds we want to check
against. Defaults to 7 days
:type days_back: int
:type days_back: Optional[int]
:param date_filter_column: The column name for the dates to filter on. Defaults to 'ds'
:type date_filter_column: Optional[str]
:param ratio_formula: which formula to use to compute the ratio between
the two metrics. Assuming cur is the metric of today and ref is
the metric to today - days_back.
Expand All @@ -269,8 +271,8 @@ class SQLIntervalCheckOperator(BaseSQLOperator):
:type ratio_formula: str
:param ignore_zero: whether we should ignore zero metrics
:type ignore_zero: bool
:param metrics_threshold: a dictionary of ratios indexed by metrics
:type metrics_threshold: dict
:param metrics_thresholds: a dictionary of ratios indexed by metrics
:type metrics_thresholds: dict
"""

__mapper_args__ = {"polymorphic_identity": "SQLIntervalCheckOperator"}
Expand Down
5 changes: 3 additions & 2 deletions airflow/providers/amazon/aws/hooks/datasync.py
Expand Up @@ -35,8 +35,9 @@ class AWSDataSyncHook(AwsBaseHook):
:class:`~airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook`
:class:`~airflow.providers.amazon.aws.operators.datasync.AWSDataSyncOperator`
:param int wait_for_task_execution: Time to wait between two
consecutive calls to check TaskExecution status.
:param wait_interval_seconds: Time to wait between two
consecutive calls to check TaskExecution status. Defaults to 5 seconds.
:type wait_interval_seconds: Optional[int]
:raises ValueError: If wait_interval_seconds is not between 0 and 15*60 seconds.
"""

Expand Down
2 changes: 2 additions & 0 deletions airflow/providers/amazon/aws/operators/emr_create_job_flow.py
Expand Up @@ -37,6 +37,8 @@ class EmrCreateJobFlowOperator(BaseOperator):
:param job_flow_overrides: boto3 style arguments or reference to an arguments file
(must be '.json') to override emr_connection extra. (templated)
:type job_flow_overrides: dict|str
:param region_name: Region named passed to EmrHook
:type region_name: Optional[str]
"""

template_fields = ['job_flow_overrides']
Expand Down
4 changes: 1 addition & 3 deletions airflow/providers/google/ads/operators/ads.py
Expand Up @@ -35,7 +35,7 @@ class GoogleAdsListAccountsOperator(BaseOperator):
not necessarily include all accounts within the account hierarchy; rather, it will only include
accounts where your authenticated user has been added with admin or other rights in the account.
..seealso::
.. seealso::
https://developers.google.com/google-ads/api/reference/rpc
Expand All @@ -51,8 +51,6 @@ class GoogleAdsListAccountsOperator(BaseOperator):
:type gcp_conn_id: str
:param google_ads_conn_id: Airflow Google Ads connection ID
:type google_ads_conn_id: str
:param page_size: The number of results per API page request. Max 10,000
:type page_size: int
:param gzip: Option to compress local file or file data for upload
:type gzip: bool
:param impersonation_chain: Optional service account to impersonate using short-term
Expand Down

0 comments on commit 5379698

Please sign in to comment.