Open
Description
Steps to reproduce
- Create the following files:
pt1.py
"Something"
from kazoo.client import KazooClient
KAZOO_CLIENT = None
def init_kazoo_client() -> KazooClient:
"initialize"
global KAZOO_CLIENT # pylint: disable=global-statement
KAZOO_CLIENT = KazooClient()
KAZOO_CLIENT.start()
return KAZOO_CLIENT
def get_kazoo_client() -> KazooClient:
"get client"
global KAZOO_CLIENT # pylint: disable=global-statement
assert KAZOO_CLIENT is not None, "Uh oh"
return KAZOO_CLIENT
pt.py
"Something"
import pt1
pt1.init_kazoo_client()
ZKCONN: pt1.KazooClient = pt1.get_kazoo_client()
DATA, STAT = ZKCONN.get("/bogus-path")
- Run
pylint pt1.py pt.py
Current behavior
Pylint errors out with
************* Module pt
pt.py:7:0: E0633: Attempting to unpack a non-sequence defined at line 28 of kazoo.handlers.utils (unpacking-non-sequence)
Expected behavior
Pylint does not error out as it was doing before v2.7.0 . kazoo.client.KazooClient.get
should return a tuple or raise an exception as per their docs
pylint --version output
$ pylint --version
pylint 2.7.0
astroid 2.5
Python 3.7.9 (default, Nov 18 2020, 14:10:47)
[GCC 8.3.0]