pylint incorrectly warns about multiprocessing.Manager.Lock

Created on 18 Dec 2019  路  2Comments  路  Source: PyCQA/pylint

Steps to reproduce

pylint this file:

from multiprocessing import Manager

with Manager() as m:
    m.Lock()

Current behavior

testing.py:4: [E1101(no-member), ] Instance of 'SyncManager' has no 'Lock' member; maybe 'RLock'?

Expected behavior

It shouldn't give an error.

pylint --version output

pylint --version
pylint 2.4.4
astroid 2.3.3
Python 3.7.4 (default, Jul  9 2019, 18:15:00)
[Clang 10.0.0 (clang-1000.11.45.5)]
astroid brain bug

Most helpful comment

Most of the attributes on a SyncManager are added via a register() method (https://github.com/python/cpython/blob/v3.8.0/Lib/multiprocessing/managers.py#L1222-L1241). We'll have to add something to the astroid brain to make it understand these.

All 2 comments

Most of the attributes on a SyncManager are added via a register() method (https://github.com/python/cpython/blob/v3.8.0/Lib/multiprocessing/managers.py#L1222-L1241). We'll have to add something to the astroid brain to make it understand these.

Hi, I am another user and still receiving these errors

Was this page helpful?
0 / 5 - 0 ratings