Method: pylint.extensions.docparams.DocstringParameterChecker.check_functiondef_yields
Calls: 286, Exceptions: 0, Paths: 4Back
Path 1: 154 calls (0.54)
FunctionDef (150) AsyncFunctionDef (4)
SphinxDocstring (93) Docstring (39) GoogleDocstring (14) NumpyDocstring (8)
None (154)
1def check_functiondef_yields(
2 self, node: nodes.FunctionDef, node_doc: Docstring
3 ) -> None:
4 if not node_doc.supports_yields or node.is_abstract():
5 return
6
7 if (
8 node_doc.has_yields() or node_doc.has_yields_type()
9 ) and not node.is_generator():
10 self.add_message("redundant-yields-doc", node=node)
Path 2: 117 calls (0.41)
FunctionDef (117)
GoogleDocstring (59) NumpyDocstring (58)
1def check_functiondef_yields(
2 self, node: nodes.FunctionDef, node_doc: Docstring
3 ) -> None:
4 if not node_doc.supports_yields or node.is_abstract():
5 return
6
7 if (
8 node_doc.has_yields() or node_doc.has_yields_type()
9 ) and not node.is_generator():
10 self.add_message("redundant-yields-doc", node=node)
Path 3: 13 calls (0.05)
FunctionDef (13)
GoogleDocstring (8) NumpyDocstring (5)
1def check_functiondef_yields(
2 self, node: nodes.FunctionDef, node_doc: Docstring
3 ) -> None:
4 if not node_doc.supports_yields or node.is_abstract():
5 return
6
7 if (
8 node_doc.has_yields() or node_doc.has_yields_type()
9 ) and not node.is_generator():
10 self.add_message("redundant-yields-doc", node=node)
Path 4: 2 calls (0.01)
FunctionDef (2)
GoogleDocstring (1) NumpyDocstring (1)
1def check_functiondef_yields(
2 self, node: nodes.FunctionDef, node_doc: Docstring
3 ) -> None:
4 if not node_doc.supports_yields or node.is_abstract():
5 return
6
7 if (
8 node_doc.has_yields() or node_doc.has_yields_type()
9 ) and not node.is_generator():
10 self.add_message("redundant-yields-doc", node=node)