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