Open yeralin opened 4 years ago
Same bug here
Python 3.8.2
Isn't it more of a problem on the linter's side though?
IIRC, pylint
comes with its own inference engine and can lead to false positives when it comes to checks like no-member
. I don't find it work that well with type annotations.
As a side note, I personally use a combination of flake8, mypy(with some stricter options), and/or Pylance(pyright), which I think should be more than enough to set the baseline of code quality for a fully typed project.
Reference: https://github.com/PyCQA/pylint/issues/647#issuecomment-529359236 https://github.com/PyCQA/pylint/issues/2842#issuecomment-477906941
Have there been any solutions for this? I realize it may be an issue with pylint but it would be nice to solve without having to put # pylint: disable=no-memeber
everywhere
I tried putting it in my generated-members
.pylintrc file, but that doesn't seem to fix things
Describe the bug When I tried to use
@cbv(router)
and added a class attribute withDepends
, my pylint started complaining withE1101: Instance of 'Depends' has no '...' member (no-member)
.To Reproduce
Although, functionally everything works just fine.
Expected behavior The typing of the class var should be inferred as
ControllerClass
, notDepends
.Environment:
Python 3.7.7