From 9aa1ae0aa58e5ae0c9d229fe82c85fb494b176b7 Mon Sep 17 00:00:00 2001 From: Dominik Wombacher Date: Apr 18 2024 23:23:59 +0000 Subject: fix: Flake8 formatting issues, findings tests/test_style.py::TestStyle::test_code_with_flake8 --- diff --git a/pagure/lib/plugins.py b/pagure/lib/plugins.py index df2e513..1eb98bb 100644 --- a/pagure/lib/plugins.py +++ b/pagure/lib/plugins.py @@ -22,7 +22,6 @@ sys.modules["imp"] = mock.Mock() from straight.plugin import load # noqa: E402 - def get_plugin_names(blacklist=None, without_backref=False): """Return the list of plugins names. diff --git a/pagure/lib/tasks.py b/pagure/lib/tasks.py index d295727..bc230dc 100644 --- a/pagure/lib/tasks.py +++ b/pagure/lib/tasks.py @@ -62,10 +62,12 @@ conn = Celery("tasks", broker=broker_url, backend=broker_url) conn.conf.update(pagure_config["CELERY_CONFIG"]) -### Monkey Patch - start ### -# Issues that celery task_id is None are related to https://github.com/celery/celery/commit/726b664840b6a1fcea9225b254a393e665363ad0 -# Monkey Path to introduce the previous logic till it's clear how the Pagure code has to be adjusted, -from celery.backends.base import BaseKeyValueStoreBackend +# Monkey Patch - start +# Issues that celery task_id is None are related to +# https://github.com/celery/celery/commit/726b664840b6a1fcea9225b254a393e665363ad0 +# Monkey Path to introduce the previous logic +# till it's clear how the Pagure code has to be adjusted. +from celery.backends.base import BaseKeyValueStoreBackend # noqa: E402 def get_key_for_task(self, task_id, key=""): @@ -80,7 +82,7 @@ def get_key_for_task(self, task_id, key=""): BaseKeyValueStoreBackend.get_key_for_task = get_key_for_task -### Monkey Patch - end ### +# Monkey Patch - end @after_setup_task_logger.connect