MCPcopy
hub / github.com/django/django / __init__

Method __init__

django/utils/text.py:158–165  ·  view source on GitHub ↗
(self, *, length, replacement, convert_charrefs=True)

Source from the content-addressed store, hash-verified

156
157class TruncateCharsHTMLParser(TruncateHTMLParser):
158 def __init__(self, *, length, replacement, convert_charrefs=True):
159 self.length = length
160 self.processed_chars = 0
161 super().__init__(
162 length=calculate_truncate_chars_length(length, replacement),
163 replacement=replacement,
164 convert_charrefs=convert_charrefs,
165 )
166
167 def process(self, data):
168 self.processed_chars += len(data)

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45

Tested by

no test coverage detected