(
self, lineno, msgid, msgid_plural=None, msgctxt=None, *,
is_docstring=False, comments=None)
| 580 | return comment.startswith(self.options.comment_tags) |
| 581 | |
| 582 | def _add_message( |
| 583 | self, lineno, msgid, msgid_plural=None, msgctxt=None, *, |
| 584 | is_docstring=False, comments=None): |
| 585 | if msgid in self.options.toexclude: |
| 586 | return |
| 587 | |
| 588 | if not comments: |
| 589 | comments = [] |
| 590 | |
| 591 | key = self._key_for(msgid, msgctxt) |
| 592 | message = self.messages.get(key) |
| 593 | if message: |
| 594 | message.add_location( |
| 595 | self.filename, |
| 596 | lineno, |
| 597 | msgid_plural, |
| 598 | is_docstring=is_docstring, |
| 599 | comments=comments, |
| 600 | ) |
| 601 | else: |
| 602 | self.messages[key] = Message( |
| 603 | msgid=msgid, |
| 604 | msgid_plural=msgid_plural, |
| 605 | msgctxt=msgctxt, |
| 606 | locations={Location(self.filename, lineno)}, |
| 607 | is_docstring=is_docstring, |
| 608 | comments=comments, |
| 609 | ) |
| 610 | |
| 611 | @staticmethod |
| 612 | def _key_for(msgid, msgctxt=None): |
no test coverage detected