Spurious no-member pylint errors
rohanpm opened this issue · 0 comments
rohanpm commented
Currently, code like this:
from more_executors import Executors
with Executors.sync().with_retry() as exc:
exc.submit(lambda x: x)
Will result in a pylint error like this:
E: 3, 5: Instance of 'SyncExecutor' has no 'with_retry' member (no-member)
In more-executors repo itself, this pylint error was silenced via pylintrc. However, the same problem will affect users of the library.
The code above does not actually have a problem - the issue is that the Executors.wrap() method fools the pylint check.
It would be good to find a way to refactor the code so it has the same meaning but doesn't trigger this pylint error.