missing-function-docstring
when overriding methods of generic classes with undefined type parameters
#9766
Labels
Needs triage 📥
Just created, needs acknowledgment, triage, and proper labelling
Bug description
Pylint doesn't give
missing-function-docstring
messages for methods that@override
base class methods that have docstrings. This is good.Unfortunately, this doesn't seem to work if the base class is generic and pylint can't resolve the type parameter. So there is a
missing-function-docstring
message given in this case.An example where this happens is protobuf: The Python code generated by protobuf doesn't have the classes in it, instead they are generated at runtime. (The protobuf compiler protoc is able to generate
*.pyi
files with type stubs of the class definition, but due to #6281 pylint is not able to resolve them.)Here is some example code to reproduce it without protobuf:
When working with protobuf, substitute for example
MyProtoFile_pb2.MyMessage
forfoo
, whereMyProtoFile_pb2
is the module generated by protoc. TheMyMessage
member is only generated at runtime, so instead ofundefined-variable
you have to disableno-member
(but this issue is not about that). Themissing-function-docstring
error is the same, and I assume also the cause.I'm able to suppress the
no-member
messages withignored-modules
, but how do I get rid of themissing-function-docstring
messages?Configuration
No response
Command used
Pylint output
Expected behavior
No messages.
Pylint version
OS / Environment
No response
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: