@@ -261,26 +261,10 @@ def sort( # type:ignore[override]
261261 return type (self )([t [1 ] for t in dsu ])
262262
263263
264- # FIXME: We need to reimplement type specific displayhook and then add this
265- # back as a custom printer. This should also be moved outside utils into the
266- # core.
267-
268- # def print_slist(arg):
269- # """ Prettier (non-repr-like) and more informative printer for SList """
270- # print("SList (.p, .n, .l, .s, .grep(), .fields(), sort() available):")
271- # if hasattr(arg, 'hideonce') and arg.hideonce:
272- # arg.hideonce = False
273- # return
274- #
275- # nlprint(arg) # This was a nested list printer, now removed.
276- #
277- # print_slist = result_display.register(SList)(print_slist)
278-
279-
280264def indent (instr : str , nspaces : int = 4 , ntabs : int = 0 , flatten : bool = False ) -> str :
281265 """Indent a string a given number of spaces or tabstops.
282266
283- indent(str,nspaces=4,ntabs=0) -> indent str by ntabs+nspaces.
267+ indent(str, nspaces=4, ntabs=0) -> indent str by ntabs+nspaces.
284268
285269 Parameters
286270 ----------
@@ -300,9 +284,7 @@ def indent(instr: str, nspaces: int = 4, ntabs: int = 0, flatten: bool = False)
300284 str : string indented by ntabs and nspaces.
301285
302286 """
303- if instr is None :
304- return
305- ind = '\t ' * ntabs + ' ' * nspaces
287+ ind = "\t " * ntabs + " " * nspaces
306288 if flatten :
307289 pat = re .compile (r'^\s*' , re .MULTILINE )
308290 else :
0 commit comments