Open Enteee opened 8 months ago
With the latest version (pylint 3.2.0
) this issue got worse because using the workaround mentioned above now results in the following pylint error:
R1737: Use 'yield from' directly instead of yielding each element one by one (use-yield-from)
Thank you for update @PascalHonegger. I think you should disable the message locally with # pylint: disable=no-member
if it's a false positive instead of doing a workaround that can make the code worst.
Thank you for update @PascalHonegger. I think you should disable the message locally with
# pylint: disable=no-member
if it's a false positive instead of doing a workaround that can make the code worst.
The problem there is that you need to disable it at every call site, also isn't ideal :disappointed:
If something is generated dynamically, pylint won't be able to understand the code from your library (c-extension or not). You can then specify generated attributes with the generated-members option. For example if cv2.LINE_AA and sphinx.generated_member create false positives for no-member, you can do: $ pylint --generated-member=cv2.LINE_AA,sphinx.generated_member
https://pylint.readthedocs.io/en/stable/user_guide/messages/error/no-member.html
Bug description
The following raises a
E1101: Generator 'generator' has no 'bit_count' member (no-member)
:Configuration
No response
Command used
Pylint output
Expected behavior
Same as commented code path : Pylint should detect that the context type is
int
and notGenerator
and hence it should not raiseno-member
Pylint version
OS / Environment
No response
Additional dependencies
No response