File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ def type(self) -> str:
162162 if self .token :
163163 return self .token .type
164164 assert self .nester_tokens
165- return _removesuffix ( self .nester_tokens .opening .type , "_open" )
165+ return self .nester_tokens .opening .type . removesuffix ( "_open" )
166166
167167 @property
168168 def next_sibling (self : _NodeType ) -> _NodeType | None :
@@ -331,14 +331,3 @@ def hidden(self) -> bool:
331331 """If it's true, ignore this element when rendering.
332332 Used for tight lists to hide paragraphs."""
333333 return self ._attribute_token ().hidden
334-
335-
336- def _removesuffix (string : str , suffix : str ) -> str :
337- """Remove a suffix from a string.
338-
339- Replace this with str.removesuffix() from stdlib when minimum Python
340- version is 3.9.
341- """
342- if suffix and string .endswith (suffix ):
343- return string [: - len (suffix )]
344- return string
You can’t perform that action at this time.
0 commit comments