with_raises checks if one line doc end-with '.' . Args: node (astroid.node): the node is visiting. doc (Docstring): Docstring object. Returns: True if successful otherwise False.
(self, node, doc)
| 257 | return True |
| 258 | |
| 259 | def with_raises(self, node, doc): |
| 260 | """with_raises checks if one line doc end-with '.' . |
| 261 | Args: |
| 262 | node (astroid.node): the node is visiting. |
| 263 | doc (Docstring): Docstring object. |
| 264 | Returns: |
| 265 | True if successful otherwise False. |
| 266 | """ |
| 267 | |
| 268 | find = False |
| 269 | for t in node.body: |
| 270 | if not isinstance(t, astroid.Raise): |
| 271 | continue |
| 272 | |
| 273 | find = True |
| 274 | break |
| 275 | |
| 276 | if not find: |
| 277 | return True |
| 278 | |
| 279 | if len(doc.get_raises()) == 0: |
| 280 | self.add_message('W9008', node=node, line=node.fromlineno) |
| 281 | return False |
| 282 | |
| 283 | return True |
| 284 | |
| 285 | def with_returns(self, node, doc): |
| 286 | """with_returns checks if docstring comments what are returned . |
no test coverage detected