airflow
airflow copied to clipboard
Fix remaining D105 checks: Missing docstring in magic method
Body
Part of https://github.com/apache/airflow/issues/10742. Recently we enable D105 pydocstyle rule, however we still have some modules which do not follow D105 rule yet. It would be nice if the community help with add missing docstrings to the magic/special methods
Easy way to find all linting problem into the module
- Remove corresponding line to particular module into the
pyproject.toml
in [tool.ruff.lint.per-file-ignores] - Run ruff via pre-commit hook
❯ pre-commit run ruff --all-files
Run 'ruff' for extremely fast Python linting.............................Failed
- hook id: ruff
- exit code: 1
airflow/models/dag.py:198:9: D105 Missing docstring in magic method
airflow/models/dag.py:765:9: D105 Missing docstring in magic method
airflow/models/dag.py:768:9: D105 Missing docstring in magic method
airflow/models/dag.py:775:9: D105 Missing docstring in magic method
airflow/models/dag.py:778:9: D105 Missing docstring in magic method
airflow/models/dag.py:781:9: D105 Missing docstring in magic method
airflow/models/dag.py:797:9: D105 Missing docstring in magic method
airflow/models/dag.py:801:9: D105 Missing docstring in magic method
airflow/models/dag.py:2424:9: D105 Missing docstring in magic method
airflow/models/dag.py:3489:9: D105 Missing docstring in magic method
airflow/models/dag.py:3510:9: D105 Missing docstring in magic method
airflow/models/dag.py:3630:9: D105 Missing docstring in magic method
airflow/utils/weight_rule.py:43:9: D105 Missing docstring in magic method
Found 13 errors.
[!TIP] Feel free to ask a suggestion in slack channels
#contributors
or#new-contributors
if you stack with choose better docstring
Airflow Core
- [x]
airflow/configuration.py
- [ ]
airflow/exceptions.py
- [ ]
airflow/plugins_manager.py
- [ ]
airflow/providers_manager.py
airflow.models
- [ ]
airflow/models/abstractoperator.py
- [ ]
airflow/models/baseoperator.py
- [ ]
airflow/models/connection.py
- [ ]
airflow/models/dag.py
- [ ]
airflow/models/dagrun.py
- [ ]
airflow/models/dagwarning.py
- [ ]
airflow/models/dataset.py
- [ ]
airflow/models/expandinput.py
- [ ]
airflow/models/log.py
- [ ]
airflow/models/mappedoperator.py
- [ ]
airflow/models/param.py
- [ ]
airflow/models/pool.py
- [ ]
airflow/models/renderedtifields.py
- [ ]
airflow/models/serialized_dag.py
- [ ]
airflow/models/slamiss.py
- [ ]
airflow/models/taskfail.py
- [ ]
airflow/models/taskinstance.py
- [ ]
airflow/models/tasklog.py
- [ ]
airflow/models/taskmixin.py
- [ ]
airflow/models/variable.py
- [ ]
airflow/models/xcom.py
- [ ]
airflow/models/xcom_arg.py
airflow.utils
- [ ]
airflow/utils/context.py
- [ ]
airflow/utils/db.py
- [ ]
airflow/utils/log/secrets_masker.py
- [ ]
airflow/utils/operator_resources.py
- [ ]
airflow/utils/sqlalchemy.py
- [ ]
airflow/utils/state.py
- [ ]
airflow/utils/task_group.py
- [ ]
airflow/utils/timeout.py
- [ ]
airflow/utils/trigger_rule.py
- [ ]
airflow/utils/types.py
- [ ]
airflow/utils/weight_rule.py
airflow.ti_deps
- [ ]
airflow/ti_deps/deps/base_ti_dep.py
- [ ]
airflow/ti_deps/deps/task_not_running_dep.py
- [ ]
airflow/ti_deps/deps/valid_state_dep.py
airflow.decorators
- [ ]
airflow/decorators/base.py
- [ ]
airflow/decorators/setup_teardown.py
airflow.io
- [ ]
airflow/io/path.py
- [ ]
airflow/io/store/__init__.py
airflow.metrics
- [ ]
airflow/metrics/protocols.py
- [ ]
airflow/metrics/validators.py
airflow.sensors
- [ ]
airflow/sensors/base.py
- [ ]
airflow/sensors/external_task.py
airflow.callbacks
- [ ]
airflow/callbacks/callback_requests.py
airflow.cli
- [ ]
airflow/cli/commands/task_command.py
airflow.datasets
- [ ]
airflow/datasets/__init__.py
airflow.executors
- [ ]
airflow/executors/base_executor.py
airflow.kubernetes
- [ ]
airflow/kubernetes/pre_7_4_0_compatibility/secret.py
airflow.timetables
- [ ]
airflow/timetables/events.py
airflow.triggers
- [ ]
airflow/triggers/base.py
Provider amazon
- [ ]
airflow/providers/amazon/aws/exceptions.py
- [ ]
airflow/providers/amazon/aws/executors/ecs/utils.py
- [ ]
airflow/providers/amazon/aws/hooks/ecr.py
- [ ]
airflow/providers/amazon/aws/utils/connection_wrapper.py
Provider databricks
- [ ]
airflow/providers/databricks/hooks/databricks.py
- [ ]
airflow/providers/databricks/hooks/databricks_base.py
- [ ]
airflow/providers/databricks/operators/databricks_repos.py
Provider cncf.kubernetes
- [ ]
airflow/providers/cncf/kubernetes/secret.py
- [ ]
airflow/providers/cncf/kubernetes/utils/delete_from.py
Provider apache
- [ ]
airflow/providers/apache/hive/hooks/hive.py
Provider elasticsearch
- [ ]
airflow/providers/elasticsearch/log/es_response.py
Provider fab
- [ ]
airflow/providers/fab/auth_manager/models/__init__.py
Provider ftp
- [ ]
airflow/providers/ftp/hooks/ftp.py
Provider google
- [ ]
airflow/providers/google/cloud/links/dataproc.py
Provider imap
- [ ]
airflow/providers/imap/hooks/imap.py
Provider microsoft.psrp
- [ ]
airflow/providers/microsoft/psrp/hooks/psrp.py
Provider mongo
- [ ]
airflow/providers/mongo/hooks/mongo.py
Provider samba
- [ ]
airflow/providers/samba/hooks/samba.py
Provider smtp
- [ ]
airflow/providers/smtp/hooks/smtp.py
Provider ssh
- [ ]
airflow/providers/ssh/hooks/ssh.py
Provider tableau
- [ ]
airflow/providers/tableau/hooks/tableau.py
Committer
- [X] I acknowledge that I am a maintainer/committer of the Apache Airflow project.
@Taragolis I'm interested in working on this. Can you please assign this to me?
Just for the reference we do not expect that contributors finish all the stuff in one go, even more there is recommendation to spilt by the different PR, it could make things easier:
- Contributors do not lost interest of changes due to monotonous piece of work
- Reviewers would spend less time to review
And of course many contributors might work with the changes by the same way how it did in D401 fixes
- https://github.com/apache/airflow/pull/38452
- https://lists.apache.org/thread/8jbg1dd2lr2cfydtqbjxsd6pb6q2wkc3