MCPcopy Index your code
hub / github.com/python/cpython / Message

Class Message

Tools/i18n/pygettext.py:423–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421
422@dataclass
423class Message:
424 msgid: str
425 msgid_plural: str | None
426 msgctxt: str | None
427 locations: set[Location] = field(default_factory=set)
428 is_docstring: bool = False
429 comments: list[str] = field(default_factory=list)
430
431 def add_location(self, filename, lineno, msgid_plural=None, *,
432 is_docstring=False, comments=None):
433 if self.msgid_plural is None:
434 self.msgid_plural = msgid_plural
435 self.locations.add(Location(filename, lineno))
436 self.is_docstring |= is_docstring
437 if comments:
438 self.comments.extend(comments)
439
440
441def get_source_comments(source):

Callers 1

_add_messageMethod · 0.70

Calls 1

fieldFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…