File tree 1 file changed +1
-12
lines changed
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:
162
162
if self .token :
163
163
return self .token .type
164
164
assert self .nester_tokens
165
- return _removesuffix ( self .nester_tokens .opening .type , "_open" )
165
+ return self .nester_tokens .opening .type . removesuffix ( "_open" )
166
166
167
167
@property
168
168
def next_sibling (self : _NodeType ) -> _NodeType | None :
@@ -331,14 +331,3 @@ def hidden(self) -> bool:
331
331
"""If it's true, ignore this element when rendering.
332
332
Used for tight lists to hide paragraphs."""
333
333
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