pylint icon indicating copy to clipboard operation
pylint copied to clipboard

unpacking-non-sequence false positive when RHS is a function from pyi

Open wojdyr opened this issue 1 year ago • 0 comments

Bug description

I get E0633: Attempting to unpack a non-sequence (unpacking-non-sequence) when using stub files for C extension. Reproduced here:

unpack.py

import module1

def unpack():
    _, b = module1.func()
    return b

module1/__init__.pyi

def func() -> tuple[int, int]:
    ...

Configuration

No response

Command used

pylint unpack.py

Pylint output

************* Module unpack
unpack.py:4:4: E0633: Attempting to unpack a non-sequence (unpacking-non-sequence)

Expected behavior

no error

Pylint version

pylint 3.1.0-dev0
astroid 3.0.2
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]

OS / Environment

Linux

Additional dependencies

No response

wojdyr avatar Jan 10 '24 14:01 wojdyr