Taragolis opened a new issue, #37523: URL: https://github.com/apache/airflow/issues/37523
### Body Part of https://github.com/apache/airflow/issues/10742. Recently we enable [D105](https://docs.astral.sh/ruff/rules/undocumented-magic-method/) 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](https://docs.python.org/3/reference/datamodel.html#special-method-names) ### Easy way to find all linting problem into the module 1. Remove corresponding line to particular module into the [`pyproject.toml`](https://github.com/apache/airflow/blob/main/pyproject.toml#L1385) in [tool.ruff.lint.per-file-ignores] 2. Run ruff via [pre-commit](https://github.com/apache/airflow/blob/main/contributing-docs/08_static_code_checks.rst#pre-commit-hooks) hook ```console ❯ 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 - [ ] 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 ### Other - [ ] airflow/callbacks/callback_requests.py - [ ] airflow/cli/commands/task_command.py - [ ] airflow/datasets/__init__.py - [ ] airflow/decorators/base.py - [ ] airflow/decorators/setup_teardown.py - [ ] airflow/executors/base_executor.py - [ ] airflow/io/path.py - [ ] airflow/io/store/__init__.py - [ ] airflow/kubernetes/pre_7_4_0_compatibility/secret.py - [ ] airflow/metrics/protocols.py - [ ] airflow/metrics/validators.py - [ ] airflow/sensors/base.py - [ ] airflow/sensors/external_task.py - [ ] 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/timetables/events.py - [ ] airflow/triggers/base.py --- ## Provider [amazon](https://github.com/apache/airflow/tree/main/airflow/providers/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 [apache](https://github.com/apache/airflow/tree/main/airflow/providers/apache) - [ ] airflow/providers/apache/hive/hooks/hive.py ## Provider [cncf.kubernetes](https://github.com/apache/airflow/tree/main/airflow/providers/cncf/kubernetes) - [ ] airflow/providers/cncf/kubernetes/secret.py - [ ] airflow/providers/cncf/kubernetes/utils/delete_from.py ## Provider [databricks](https://github.com/apache/airflow/tree/main/airflow/providers/databricks) - [ ] airflow/providers/databricks/hooks/databricks.py - [ ] airflow/providers/databricks/hooks/databricks_base.py - [ ] airflow/providers/databricks/operators/databricks_repos.py ## Provider [elasticsearch](https://github.com/apache/airflow/tree/main/airflow/providers/elasticsearch) - [ ] airflow/providers/elasticsearch/log/es_response.py ## Provider [fab](https://github.com/apache/airflow/tree/main/airflow/providers/fab) - [ ] airflow/providers/fab/auth_manager/models/__init__.py ## Provider [ftp](https://github.com/apache/airflow/tree/main/airflow/providers/ftp) - [ ] airflow/providers/ftp/hooks/ftp.py ## Provider [google](https://github.com/apache/airflow/tree/main/airflow/providers/google) - [ ] airflow/providers/google/cloud/links/dataproc.py ## Provider [imap](https://github.com/apache/airflow/tree/main/airflow/providers/imap) - [ ] airflow/providers/imap/hooks/imap.py ## Provider [microsoft.psrp](https://github.com/apache/airflow/tree/main/airflow/providers/microsoft/psrp) - [ ] airflow/providers/microsoft/psrp/hooks/psrp.py ## Provider [mongo](https://github.com/apache/airflow/tree/main/airflow/providers/mongo) - [ ] airflow/providers/mongo/hooks/mongo.py ## Provider [samba](https://github.com/apache/airflow/tree/main/airflow/providers/samba) - [ ] airflow/providers/samba/hooks/samba.py ## Provider [smtp](https://github.com/apache/airflow/tree/main/airflow/providers/smtp) - [ ] airflow/providers/smtp/hooks/smtp.py ## Provider [ssh](https://github.com/apache/airflow/tree/main/airflow/providers/ssh) - [ ] airflow/providers/ssh/hooks/ssh.py ## Provider [tableau](https://github.com/apache/airflow/tree/main/airflow/providers/tableau) - [ ] airflow/providers/tableau/hooks/tableau.py ### Committer - [X] I acknowledge that I am a maintainer/committer of the Apache Airflow project. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
