celery-chunkify-task icon indicating copy to clipboard operation
celery-chunkify-task copied to clipboard

mypy 1.2.0 throws errors

Open verhovensky opened this issue 1 year ago • 0 comments

mypy 1.2.0 throws errors in return statement in next() method of BaseChunk class if I use IntChunk

notification/chunkificator.py:65: error: Unexpected keyword argument "start" for "BaseChunk"  [call-arg]
notification/chunkificator.py:65: error: Unexpected keyword argument "size" for "BaseChunk"  [call-arg]
notification/chunkificator.py:65: error: Unexpected keyword argument "max" for "BaseChunk"  [call-arg]
notification/chunkificator.py:65: error: Unexpected keyword argument "mode" for "BaseChunk"  [call-arg]
notification/chunkificator.py:184: error: Incompatible return value type (got "BaseChunk", expected "IntChunk")  [return-value]
Found 5 errors in 1 file (checked 4 source files)

My environment:

OS Linux GNU/Linux Python 3.9.2 pip 22.3.1 Celery 5.2.7 mypy 1.2.0

Nevertheless, class/decorator itself works as expected

verhovensky avatar Apr 10 '23 16:04 verhovensky