Skip to content

Commit e13a14c

Browse files
authored
Enable & Fix Whitespace related PyDocStyle Checks (#9458)
1 parent 74f7db0 commit e13a14c

40 files changed

+158
-123
lines changed

β€Ž.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ metastore_browser/templates/.*\\.html$|.*\\.jinja2"
180180
hooks:
181181
- id: pydocstyle
182182
args:
183-
- --select=D300,D301,D302,D101
183+
- --select=D300,D301,D302,D101,D201,D206,D207,D208,D209,D211,D414
184184
exclude: ^tests/.*\.py$|^scripts/.*\.py$|^dev|^backport_packages|^kubernetes_tests
185185
- repo: local
186186
hooks:

β€Žairflow/api/common/experimental/mark_tasks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ def get_all_dag_task_query(dag, session, state, task_ids, confirmed_dates):
169169

170170
def get_subdag_runs(dag, session, state, task_ids, commit, confirmed_dates):
171171
"""Go through subdag operators and create dag runs. We will only work
172-
within the scope of the subdag. We wont propagate to the parent dag,
173-
but we will propagate from parent to subdag.
172+
within the scope of the subdag. We wont propagate to the parent dag,
173+
but we will propagate from parent to subdag.
174174
"""
175175
dags = [dag]
176176
sub_dag_ids = []

β€Žairflow/contrib/hooks/azure_container_instance_hook.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
# specific language governing permissions and limitations
1717
# under the License.
1818
"""This module is deprecated.
19-
Please use `airflow.providers.microsoft.azure.hooks.azure_container_instance`."""
19+
20+
Please use `airflow.providers.microsoft.azure.hooks.azure_container_instance`.
21+
"""
2022

2123
import warnings
2224

β€Žairflow/contrib/operators/awsbatch_operator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919

2020
"""This module is deprecated. Please use:
2121
22-
- `airflow.providers.amazon.aws.operators.batch`
23-
- `airflow.providers.amazon.aws.hooks.batch_client`
24-
- `airflow.providers.amazon.aws.hooks.batch_waiters`
22+
- `airflow.providers.amazon.aws.operators.batch`
23+
- `airflow.providers.amazon.aws.hooks.batch_client`
24+
- `airflow.providers.amazon.aws.hooks.batch_waiters``
2525
"""
2626

2727
import warnings

β€Žairflow/contrib/operators/oracle_to_oracle_transfer.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
# KIND, either express or implied. See the License for the
1616
# specific language governing permissions and limitations
1717
# under the License.
18-
"""This module is deprecated. Please use `airflow.providers.oracle.transfers.oracle_to_oracle`."""
18+
"""This module is deprecated.
19+
20+
Please use `airflow.providers.oracle.transfers.oracle_to_oracle`.
21+
"""
1922

2023
import warnings
2124

@@ -29,10 +32,11 @@
2932

3033

3134
class OracleToOracleTransfer(OracleToOracleOperator):
32-
"""
33-
This class is deprecated.
35+
"""This class is deprecated.
36+
3437
Please use:
35-
`airflow.providers.oracle.transfers.oracle_to_oracle.OracleToOracleOperator`."""
38+
`airflow.providers.oracle.transfers.oracle_to_oracle.OracleToOracleOperator`.
39+
"""
3640

3741
def __init__(self, *args, **kwargs):
3842
warnings.warn(

β€Žairflow/contrib/operators/pubsub_operator.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
# specific language governing permissions and limitations
1717
# under the License.
1818
"""This module is deprecated.
19-
Please use `airflow.providers.google.cloud.operators.pubsub`."""
19+
20+
Please use `airflow.providers.google.cloud.operators.pubsub`.
21+
"""
2022

2123
import warnings
2224

@@ -34,8 +36,8 @@
3436

3537

3638
class PubSubPublishOperator(PubSubPublishMessageOperator):
37-
"""
38-
This class is deprecated.
39+
"""This class is deprecated.
40+
3941
Please use `airflow.providers.google.cloud.operators.pubsub.PubSubPublishMessageOperator`.
4042
"""
4143

@@ -50,8 +52,8 @@ def __init__(self, *args, **kwargs):
5052

5153

5254
class PubSubSubscriptionCreateOperator(PubSubCreateSubscriptionOperator):
53-
"""
54-
This class is deprecated.
55+
"""This class is deprecated.
56+
5557
Please use `airflow.providers.google.cloud.operators.pubsub.PubSubCreateSubscriptionOperator`.
5658
"""
5759

@@ -66,8 +68,8 @@ def __init__(self, *args, **kwargs):
6668

6769

6870
class PubSubSubscriptionDeleteOperator(PubSubDeleteSubscriptionOperator):
69-
"""
70-
This class is deprecated.
71+
"""This class is deprecated.
72+
7173
Please use `airflow.providers.google.cloud.operators.pubsub.PubSubDeleteSubscriptionOperator`.
7274
"""
7375

@@ -82,8 +84,8 @@ def __init__(self, *args, **kwargs):
8284

8385

8486
class PubSubTopicCreateOperator(PubSubCreateTopicOperator):
85-
"""
86-
This class is deprecated.
87+
"""This class is deprecated.
88+
8789
Please use `airflow.providers.google.cloud.operators.pubsub.PubSubCreateTopicOperator`.
8890
"""
8991

@@ -98,8 +100,8 @@ def __init__(self, *args, **kwargs):
98100

99101

100102
class PubSubTopicDeleteOperator(PubSubDeleteTopicOperator):
101-
"""
102-
This class is deprecated.
103+
"""This class is deprecated.
104+
103105
Please use `airflow.providers.google.cloud.operators.pubsub.PubSubDeleteTopicOperator`.
104106
"""
105107

β€Žairflow/contrib/operators/vertica_to_hive.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
# KIND, either express or implied. See the License for the
1616
# specific language governing permissions and limitations
1717
# under the License.
18-
"""This module is deprecated. Please use `airflow.providers.apache.hive.transfers.vertica_to_hive`."""
18+
"""This module is deprecated.
19+
20+
Please use `airflow.providers.apache.hive.transfers.vertica_to_hive`.
21+
"""
1922

2023
import warnings
2124

@@ -28,10 +31,11 @@
2831

2932

3033
class VerticaToHiveTransfer(VerticaToHiveOperator):
31-
"""
32-
This class is deprecated.
34+
"""This class is deprecated.
35+
3336
Please use:
34-
`airflow.providers.apache.hive.transfers.vertica_to_hive.VerticaToHiveOperator`."""
37+
`airflow.providers.apache.hive.transfers.vertica_to_hive.VerticaToHiveOperator`.
38+
"""
3539

3640
def __init__(self, *args, **kwargs):
3741
warnings.warn(

β€Žairflow/contrib/operators/vertica_to_mysql.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
# KIND, either express or implied. See the License for the
1616
# specific language governing permissions and limitations
1717
# under the License.
18-
"""This module is deprecated. Please use `airflow.providers.mysql.transfers.vertica_to_mysql`."""
18+
"""This module is deprecated.
19+
20+
Please use `airflow.providers.mysql.transfers.vertica_to_mysql`.
21+
"""
1922

2023
import warnings
2124

@@ -29,10 +32,11 @@
2932

3033

3134
class VerticaToMySqlTransfer(VerticaToMySqlOperator):
32-
"""
33-
This class is deprecated.
35+
"""This class is deprecated.
36+
3437
Please use:
35-
`airflow.providers.mysql.transfers.vertica_to_mysql.VerticaToMySqlOperator`."""
38+
`airflow.providers.mysql.transfers.vertica_to_mysql.VerticaToMySqlOperator`.
39+
"""
3640

3741
def __init__(self, *args, **kwargs):
3842
warnings.warn(

β€Žairflow/contrib/sensors/gcp_transfer_sensor.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
# specific language governing permissions and limitations
1717
# under the License.
1818
"""This module is deprecated.
19-
Please use `airflow.providers.google.cloud.sensors.cloud_storage_transfer_service`."""
19+
20+
Please use `airflow.providers.google.cloud.sensors.cloud_storage_transfer_service`.
21+
"""
2022

2123
import warnings
2224

@@ -32,8 +34,8 @@
3234

3335

3436
class GCPTransferServiceWaitForJobStatusSensor(CloudDataTransferServiceJobStatusSensor):
35-
"""
36-
This class is deprecated.
37+
"""This class is deprecated.
38+
3739
Please use `airflow.providers.google.cloud.sensors.transfer.CloudDataTransferServiceJobStatusSensor`.
3840
"""
3941
def __init__(self, *args, **kwargs):

β€Žairflow/contrib/sensors/hdfs_sensor.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
# KIND, either express or implied. See the License for the
1616
# specific language governing permissions and limitations
1717
# under the License.
18-
"""This module is deprecated. Please use `airflow.providers.apache.hdfs.sensors.hdfs`."""
18+
"""This module is deprecated.
19+
20+
Please use `airflow.providers.apache.hdfs.sensors.hdfs`.
21+
"""
1922

2023
import warnings
2124

@@ -30,10 +33,11 @@
3033

3134
# pylint: disable=too-many-ancestors
3235
class HdfsSensorFolder(HdfsFolderSensor):
33-
"""
34-
This class is deprecated.
36+
"""This class is deprecated.
37+
3538
Please use:
36-
`airflow.providers.apache.hdfs.sensors.hdfs.HdfsFolderSensor`."""
39+
`airflow.providers.apache.hdfs.sensors.hdfs.HdfsFolderSensor`.
40+
"""
3741

3842
def __init__(self, *args, **kwargs):
3943
warnings.warn(
@@ -47,10 +51,11 @@ def __init__(self, *args, **kwargs):
4751

4852
# pylint: disable=too-many-ancestors
4953
class HdfsSensorRegex(HdfsRegexSensor):
50-
"""
51-
This class is deprecated.
54+
"""This class is deprecated.
55+
5256
Please use:
53-
`airflow.providers.apache.hdfs.sensors.hdfs.HdfsRegexSensor`."""
57+
`airflow.providers.apache.hdfs.sensors.hdfs.HdfsRegexSensor`.
58+
"""
5459

5560
def __init__(self, *args, **kwargs):
5661
warnings.warn(

0 commit comments

Comments
 (0)