Append a part of a string. If this is the first entry part and the part doesn't start with a markup macro, the first character will be capitalized.
(self, part)
| 176 | self.append(text) |
| 177 | |
| 178 | def append(self, part): |
| 179 | """Append a part of a string. |
| 180 | |
| 181 | If this is the first entry part and the part doesn't start |
| 182 | with a markup macro, the first character will be capitalized.""" |
| 183 | if not self.parts and not _STARTS_WITH_MACRO_RE.match(part): |
| 184 | self.parts.append(part[:1].upper()) |
| 185 | self.parts.append(part[1:]) |
| 186 | else: |
| 187 | self.parts.append(part) |
| 188 | if self.verbose: |
| 189 | print('ValidityEntry', id(self), 'after append:', str(self)) |
| 190 | |
| 191 | def drop_end(self, n): |
| 192 | """Remove up to n trailing characters from the string.""" |
no outgoing calls
no test coverage detected