jscheffl commented on code in PR #45038:
URL: https://github.com/apache/airflow/pull/45038#discussion_r1895009615
##########
providers/src/airflow/providers/celery/executors/default_celery.py:
##########
@@ -85,6 +87,7 @@ def _broker_supports_visibility_timeout(url):
),
"worker_concurrency": conf.getint("celery", "WORKER_CONCURRENCY",
fallback=16),
"worker_enable_remote_control": conf.getboolean("celery",
"worker_enable_remote_control", fallback=True),
+ **extra_celery_config,
Review Comment:
As CI did not get to this stage (yet) as failing earlier, there will be a
problem reported by mypy for providers like:
```
providers/src/airflow/providers/celery/executors/default_celery.py:72: error:
Incompatible types in assignment (expression has type
"Union[dict[Any, Any], list[Any], str, int, float, None]", variable has type
"dict[Any, Any]") [assignment]
extra_celery_config: dict = conf.getjson("celery", "extra_celery_confi...
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
Found 1 error in 1 file (checked 1 source file)
Error 1 returned
```
As the JSON result can be other values than a dict (irrespective of the type
declaration above, you need to use:
```suggestion
**(extra_celery_config if isinstance(extra_celery_config, dict) else {}),
```
--
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]