Skip to content

mypy 1.2.0 throws errors #3

@verhovensky

Description

@verhovensky

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions