diff --git a/README.md b/README.md index 49993e8fb9..b8fed97512 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![CircleCI](https://circleci.com/gh/digitalfabrik/integreat-cms.svg?style=shield)](https://circleci.com/gh/digitalfabrik/integreat-cms) -[![Ruff](https://img.shields.io/badge/ruff-10.00-brightgreen)](https://docs.astral.sh/ruff/) +[![Ruff](https://img.shields.io/badge/ruff-0.9.1-brightgreen)](https://docs.astral.sh/ruff/) ![Coverage](https://img.shields.io/codeclimate/coverage/digitalfabrik/integreat-cms) [![PyPi](https://img.shields.io/pypi/v/integreat-cms.svg)](https://pypi.org/project/integreat-cms/) [![Release Notes](https://img.shields.io/badge/%F0%9F%93%9C-release%20notes-blue)](https://digitalfabrik.github.io/integreat-cms/release-notes.html) diff --git a/docs/src/code-style.rst b/docs/src/code-style.rst index 10017e45d5..9cbddcd636 100644 --- a/docs/src/code-style.rst +++ b/docs/src/code-style.rst @@ -2,6 +2,8 @@ Code Style Guidelines ********************* +.. _ruff: + Ruff ------ @@ -15,6 +17,8 @@ If you want to lint your code and apply the formatting without committing, use o ./tools/ruff.sh +.. _djlint: + DjLint ------ diff --git a/docs/src/git-flow.rst b/docs/src/git-flow.rst index 1c3a539dc3..1caa78cbb8 100644 --- a/docs/src/git-flow.rst +++ b/docs/src/git-flow.rst @@ -94,7 +94,7 @@ All hooks for this repository are defined in :github-source:`.pre-commit-config. At the moment, the following hooks are configured: * ``shellcheck``: a static analysis tool for shell scripts (see: :ref:`shellcheck` and `ShellCheck wiki `_) -* ``ruff``: A formatter and linter which applies automatic code formatting to Python files (see :ref:`ruff-code-style`) +* ``ruff``: A formatter and linter which applies automatic code formatting to Python files (see :ref:`ruff`) * ``prettier``: A formatter which applies automatic code formatting to CSS/JS files (see :ref:`prettier-code-style`) * ``djlint``: A formatter which applies automatic code formatting to Django HTML templates (see :ref:`djlint`) * ``translations`` A script which checks whether the translation file is up-to-date (see: :doc:`internationalization` and :ref:`translations`) diff --git a/integreat_cms/README.md b/integreat_cms/README.md index 371586abfa..82fd321db2 100644 --- a/integreat_cms/README.md +++ b/integreat_cms/README.md @@ -1,5 +1,5 @@ [![CircleCI](https://circleci.com/gh/digitalfabrik/integreat-cms.svg?style=shield)](https://circleci.com/gh/digitalfabrik/integreat-cms) -[![Ruff](https://img.shields.io/badge/ruff-10.00-brightgreen)](https://docs.astral.sh/ruff/) +[![Ruff](https://img.shields.io/badge/ruff-0.9.1-brightgreen)](https://docs.astral.sh/ruff/) ![Coverage](https://img.shields.io/codeclimate/coverage/digitalfabrik/integreat-cms) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) diff --git a/integreat_cms/integreat_celery/celery.py b/integreat_cms/integreat_celery/celery.py index f78112f2ee..7aca36bde7 100644 --- a/integreat_cms/integreat_celery/celery.py +++ b/integreat_cms/integreat_celery/celery.py @@ -3,18 +3,21 @@ Usage example: -@app.task -def wrapper_create_statistics(): - print("create statistics") - - -@app.on_after_configure.connect -def setup_periodic_tasks(sender, **kwargs): - sender.add_periodic_task( - 84600, - wrapper_create_statistics.s(), - name="wrapper_create_statistics", - ) +.. code-block:: python + + @app.task + def wrapper_create_statistics(): + print("create statistics") + + + @app.on_after_configure.connect + def setup_periodic_tasks(sender, **kwargs): + sender.add_periodic_task( + 84600, + wrapper_create_statistics.s(), + name="wrapper_create_statistics", + ) + """ import configparser