-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Add D205 pydocstyle check #11627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add D205 pydocstyle check #11627
Conversation
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst)
|
Static checks are failing::
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left some review, but you have made many of the lines too long, and (needlessly?) changed the line wrapping -- please don't do that unless there is a reason.
For example, this sort of change is not needed:
@@ -1856,8 +1861,7 @@ def get_default_view(self):
@provide_session
def deactivate_unknown_dags(active_dag_ids, session=None):
"""
- Given a list of known DAGs, deactivate any other DAGs that are
- marked as active in the ORM
+ Given a list of known DAGs, deactivate any other DAGs that are marked as active in the ORM
:param active_dag_ids: list of DAG IDs that are active
:type active_dag_ids: list[unicode]
airflow/__init__.py
Outdated
Authentication is implemented using flask_login and different environments can | ||
implement their own login mechanisms by providing an `airflow_login` module | ||
in their PYTHONPATH. airflow_login should be based off the | ||
Authentication is implemented using flask_login and different environments can implement their own login mechanisms by providing an `airflow_login` module in their PYTHONPATH. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is too long. Please wrap at 110 characters.
GunicornMonitor | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GunicornMonitor |
The existing first paragraph was a good summary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing first paragraph was good. But it's long as a first line summary .
Obeying D205 and E501 summary line needs to obey two rules.
- only 1 line (not 2+ line)
- length < 110
airflow/configuration.py
Outdated
Expands (potentially nested) env vars by repeatedly applying | ||
`expandvars` and `expanduser` until interpolation stops having | ||
any effect. | ||
Expands (potentially nested) env vars by repeatedly applying `expandvars` and `expanduser` until interpolation stops having any effect. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous version was fine as it was.
@@ -17,8 +17,7 @@ | |||
# under the License. | |||
|
|||
""" | |||
Example DAG demonstrating the usage of BranchPythonOperator with depends_on_past=True, where tasks may be run | |||
or skipped on alternating runs. | |||
Example DAG demonstrating the usage of BranchPythonOperator with depends_on_past=True, where tasks may be run or skipped on alternating runs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert this -- previous one was fine.
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
Static checks are sad.
|
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
I didn't modify these files. How can I pass these CI. And |
I believe it was a merge of a change that failed the static checks - it is already fixed by 95be3ee and you need to rebase to latest master to fix it (that's what I did with my PRs) |
@potiuk 🙏 |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
@potiuk |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
@kaxil 🙏 |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
@kaxil |
CI is sad. I working on fix.
|
Spell check is sad now. :-/
|
airflow/models/dag.py
Outdated
@@ -388,6 +390,8 @@ def __exit__(self, _type, _value, _tb): | |||
@staticmethod | |||
def _upgrade_outdated_dag_access_control(access_control=None): | |||
""" | |||
_upgrade_outdated_dag_access_control |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks unreleated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not be adding a dummy Summary heading for docstring @ktrueda
airflow/models/dag.py
Outdated
@@ -525,6 +531,8 @@ def next_dagrun_info( | |||
|
|||
def next_dagrun_after_date(self, date_last_automated_dagrun: Optional[pendulum.DateTime]): | |||
""" | |||
next_dagrun_after_date |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks unrelated.
airflow/models/dag.py
Outdated
@@ -810,6 +817,8 @@ def normalized_schedule_interval(self) -> Optional[ScheduleInterval]: | |||
@provide_session | |||
def handle_callback(self, dagrun, success=True, reason=None, session=None): | |||
""" | |||
handle_callback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks unrelated.
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
Fixed spelling and pushed |
@ktrueda CI is sad. Can you do a rebase? |
Thank you. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It in earlier duplicate of 1029499 run. |
airflow/__init__.py
Outdated
@@ -18,6 +18,8 @@ | |||
# | |||
|
|||
""" | |||
__init__.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a Dummy header
@@ -218,6 +221,8 @@ def verify_dagruns(dag_runs, commit, state, session, current_task): | |||
|
|||
def verify_dag_run_integrity(dag, dates): | |||
""" | |||
verify_dag_run_integrity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a Dummy header
@@ -105,6 +107,8 @@ def __init__( | |||
|
|||
def _generate_plugin_state(self) -> Dict[str, float]: | |||
""" | |||
_generate_plugin_state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a Dummy header
@@ -52,6 +52,8 @@ | |||
|
|||
def expand_env_var(env_var): | |||
""" | |||
expand_env_var |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a Dummy header
@@ -225,6 +227,8 @@ def _validate(self): | |||
|
|||
def _validate_config_dependencies(self): | |||
""" | |||
_validate_config_dependencies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are lot of dummy headers instead of actual headers that needs to be fixed
@kaxil |
@kaxil |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
@kaxil |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
Enabled D205 Pydocstyle check
Part of issue: #10742