equal
deleted
inserted
replaced
87 |
87 |
88 cache = _msgcache.setdefault(encoding.encoding, {}) |
88 cache = _msgcache.setdefault(encoding.encoding, {}) |
89 if message not in cache: |
89 if message not in cache: |
90 if type(message) is str: |
90 if type(message) is str: |
91 # goofy unicode docstrings in test |
91 # goofy unicode docstrings in test |
92 paragraphs = message.split(u'\n\n') # type: List[str] |
92 paragraphs: List[str] = message.split(u'\n\n') |
93 else: |
93 else: |
94 # should be ascii, but we have unicode docstrings in test, which |
94 # should be ascii, but we have unicode docstrings in test, which |
95 # are converted to utf-8 bytes on Python 3. |
95 # are converted to utf-8 bytes on Python 3. |
96 paragraphs = [p.decode("utf-8") for p in message.split(b'\n\n')] |
96 paragraphs = [p.decode("utf-8") for p in message.split(b'\n\n')] |
97 # Be careful not to translate the empty string -- it holds the |
97 # Be careful not to translate the empty string -- it holds the |