Empty transform plugin leads to false-positive missing-function-docstring issues #10352
Labels
False Positive 🦟
A message is emitted but nothing is wrong with the code
Needs reproduction 🔍
Need a way to reproduce it locally on a maintainer's machine
Bug description
I have recently started replacing
typing.TypeVar
/typing.Generic
usage with Python 3.12 style type-params in my codebase, and it has led to some odd new false positive issues being detected by pylint.I have distilled things down to as simple a repro case as I can. It is worth noting that I am using a custom pylint transform plugin in my codebase and I found the issues only manifest with it enabled. Normally I would assume my plugin is at fault; however I also found that the issues persist even if I strip the plugin down to do nothing at all, so I figured it would still be worth submitting.
To repro the issue, place the following code in
pylintbug.py
:Also place the following code in
pylintbugplug.py
:Now run the following command from directory containing
pylintbugplug.py
andpylintbug.py
:Pylint output
Expected behavior
I would expect the test case to not complain about any missing docstrings since all methods without docstrings are overrides.
You can see in the example code that the old style setup using typing.Generic/typing.TypeVar behaves as expected, but the new style type-param equivalent does not.
Pylint version
OS / Environment
Sequoia 15.4.1 on Apple Silicon
Additional dependencies
The text was updated successfully, but these errors were encountered: