Support for Pylint #90827
Labels
module: lint
Issues related to our Python/C++ lint rules (run by Travis)
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
馃殌 The feature, motivation and pitch
Using linters is crucial for code safety and clarity. One of the commonly used linters Pylint (e.g. default for Visual Studio Code), fails to find members in the
torch
module as these are supposedly generated (see pylint-dev/pylint#7937).Alternatives
Pylint supports external C libraries through the use of the
--extension-pkg-allow-list
option, and this works well e.g. for NumPy, but not for PyTorch.The common solution people use is to completely ignore
torch
members by using--generated-members=numpy.*,torch.*
, which is like using no linting for PyTorch at all.Additional context
This issue has been repeatedly brought up with no solution, see #24807, #1942, #701. PyLint devs claim they are unable to receive member information from PyTorch, see pylint-dev/pylint#7937.
The text was updated successfully, but these errors were encountered: