MCPcopy Create free account
hub / github.com/PaddlePaddle/Serving / has_period

Method has_period

tools/codestyle/docstring_checker.py:240–257  ·  view source on GitHub ↗

has_period checks if one line doc end-with '.' . Args: node (astroid.node): the node is visiting. Returns: True if successful otherwise False.

(self, node)

Source from the content-addressed store, hash-verified

238 return True
239
240 def has_period(self, node):
241 """has_period checks if one line doc end-with '.' .
242 Args:
243 node (astroid.node): the node is visiting.
244 Returns:
245 True if successful otherwise False.
246 """
247 if node.doc is None:
248 return True
249
250 if len(node.doc.splitlines()) > 1:
251 return True
252
253 if not node.doc.strip().endswith('.'):
254 self.add_message('W9002', node=node, line=node.fromlineno)
255 return False
256
257 return True
258
259 def with_raises(self, node, doc):
260 """with_raises checks if one line doc end-with '.' .

Callers 1

check_doc_stringMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected