From 1660756b2f91f269e7d3da5f8d3e84557732e8b6 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Wed, 3 Jul 2024 09:43:01 +0200 Subject: [PATCH] Disable the new `check-class-attributes` check in pydoclint 0.5.3 We use a different way to document class attributes, so this check is not useful for us. Signed-off-by: Leandro Lucarella --- RELEASE_NOTES.md | 1 + cookiecutter/migrate.sh | 5 +++++ .../{{cookiecutter.github_repo_name}}/pyproject.toml | 1 + pyproject.toml | 1 + .../actor/frequenz-actor-test/pyproject.toml | 1 + .../api/frequenz-api-test/pyproject.toml | 1 + .../app/frequenz-app-test/pyproject.toml | 1 + .../lib/frequenz-test-python/pyproject.toml | 1 + .../model/frequenz-model-test/pyproject.toml | 1 + 9 files changed, 13 insertions(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 6d8db199..8d9d9390 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -54,3 +54,4 @@ - Make the `nox-cross-arch-all` job fail if any `nox-cross-arch` matrix job fails. - Fix credentials not being passed to the `test-installation` job in the CI workflow. - Make sure credentials are configured for all jobs that check out the repository in the CI workflow. +- Disable the new `check-class-attributes` check in pydoclint 0.5.3, as we use a different way to document class attributes. diff --git a/cookiecutter/migrate.sh b/cookiecutter/migrate.sh index 1ede6b01..e017f0e2 100644 --- a/cookiecutter/migrate.sh +++ b/cookiecutter/migrate.sh @@ -241,5 +241,10 @@ EOF manual_step "Please make sure to remove or uncomment the options to the 'gh-action-setup-git' action in the '.github/workflows/ci.yaml'" grep -n "TODO(cookiecutter)" -- .github/workflows/ci.yaml .github/containers/test-installation/Dockerfile +echo "========================================================================" + +echo "Disabling new pydoclint's check-class-attributes check in " +sed -i "/^allow-init-docstring/a check-class-attributes = false" pyproject.toml + # Add a separation line like this one after each migration step. echo "========================================================================" diff --git a/cookiecutter/{{cookiecutter.github_repo_name}}/pyproject.toml b/cookiecutter/{{cookiecutter.github_repo_name}}/pyproject.toml index 719f0f7d..a72bd512 100644 --- a/cookiecutter/{{cookiecutter.github_repo_name}}/pyproject.toml +++ b/cookiecutter/{{cookiecutter.github_repo_name}}/pyproject.toml @@ -148,6 +148,7 @@ check-yield-types = false arg-type-hints-in-docstring = false arg-type-hints-in-signature = true allow-init-docstring = true +check-class-attributes = false [tool.pylint.similarities] ignore-comments = ['yes'] diff --git a/pyproject.toml b/pyproject.toml index 3ffe762f..f64e2b03 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -146,6 +146,7 @@ check-yield-types = false arg-type-hints-in-docstring = false arg-type-hints-in-signature = true allow-init-docstring = true +check-class-attributes = false [tool.pylint.similarities] ignore-comments = ['yes'] diff --git a/tests_golden/integration/test_cookiecutter_generation/actor/frequenz-actor-test/pyproject.toml b/tests_golden/integration/test_cookiecutter_generation/actor/frequenz-actor-test/pyproject.toml index 5a2ed6b5..34613791 100644 --- a/tests_golden/integration/test_cookiecutter_generation/actor/frequenz-actor-test/pyproject.toml +++ b/tests_golden/integration/test_cookiecutter_generation/actor/frequenz-actor-test/pyproject.toml @@ -122,6 +122,7 @@ check-yield-types = false arg-type-hints-in-docstring = false arg-type-hints-in-signature = true allow-init-docstring = true +check-class-attributes = false [tool.pylint.similarities] ignore-comments = ['yes'] diff --git a/tests_golden/integration/test_cookiecutter_generation/api/frequenz-api-test/pyproject.toml b/tests_golden/integration/test_cookiecutter_generation/api/frequenz-api-test/pyproject.toml index 04d1cc07..86247686 100644 --- a/tests_golden/integration/test_cookiecutter_generation/api/frequenz-api-test/pyproject.toml +++ b/tests_golden/integration/test_cookiecutter_generation/api/frequenz-api-test/pyproject.toml @@ -117,6 +117,7 @@ check-yield-types = false arg-type-hints-in-docstring = false arg-type-hints-in-signature = true allow-init-docstring = true +check-class-attributes = false [tool.pylint.similarities] ignore-comments = ['yes'] diff --git a/tests_golden/integration/test_cookiecutter_generation/app/frequenz-app-test/pyproject.toml b/tests_golden/integration/test_cookiecutter_generation/app/frequenz-app-test/pyproject.toml index 2cde7093..b01b3021 100644 --- a/tests_golden/integration/test_cookiecutter_generation/app/frequenz-app-test/pyproject.toml +++ b/tests_golden/integration/test_cookiecutter_generation/app/frequenz-app-test/pyproject.toml @@ -121,6 +121,7 @@ check-yield-types = false arg-type-hints-in-docstring = false arg-type-hints-in-signature = true allow-init-docstring = true +check-class-attributes = false [tool.pylint.similarities] ignore-comments = ['yes'] diff --git a/tests_golden/integration/test_cookiecutter_generation/lib/frequenz-test-python/pyproject.toml b/tests_golden/integration/test_cookiecutter_generation/lib/frequenz-test-python/pyproject.toml index fb7fa3fe..b0f924f2 100644 --- a/tests_golden/integration/test_cookiecutter_generation/lib/frequenz-test-python/pyproject.toml +++ b/tests_golden/integration/test_cookiecutter_generation/lib/frequenz-test-python/pyproject.toml @@ -118,6 +118,7 @@ check-yield-types = false arg-type-hints-in-docstring = false arg-type-hints-in-signature = true allow-init-docstring = true +check-class-attributes = false [tool.pylint.similarities] ignore-comments = ['yes'] diff --git a/tests_golden/integration/test_cookiecutter_generation/model/frequenz-model-test/pyproject.toml b/tests_golden/integration/test_cookiecutter_generation/model/frequenz-model-test/pyproject.toml index 52e11caf..d542c170 100644 --- a/tests_golden/integration/test_cookiecutter_generation/model/frequenz-model-test/pyproject.toml +++ b/tests_golden/integration/test_cookiecutter_generation/model/frequenz-model-test/pyproject.toml @@ -122,6 +122,7 @@ check-yield-types = false arg-type-hints-in-docstring = false arg-type-hints-in-signature = true allow-init-docstring = true +check-class-attributes = false [tool.pylint.similarities] ignore-comments = ['yes']