celery-types icon indicating copy to clipboard operation
celery-types copied to clipboard

mypy: "<some_param> to "delay" of "Task" has incompatible type <some_type>; expected <nothing>

Open dashdanw opened this issue 1 year ago • 2 comments

Updating from 0.15 to 0.18 (via a bandit bump to 1.7.5) seems to have broken mypy's ability to distinguish task parameters correctly. In lieu of rolling back my celery-types version I was curious if anyone knows a workaround or if I am maybe doing something incorrectly?

dashdanw avatar Jun 30 '23 15:06 dashdanw

@dashdanw Were you able to find a workaround? I'm having the same issue.

tcrasset avatar Jul 07 '23 12:07 tcrasset

I found some inconsistencies in the required python version (see here). Notably, an overload of a task declaration was using Concatenate which is only available since Python version 3.10.

After installing a new python version, I'm now getting a different kind of error.

tcrasset avatar Jul 07 '23 12:07 tcrasset