Return width long restart line formatted with filename. Fill line with balanced '='s, with any extras and at least one at the beginning. Do not end with a trailing space.
(width, filename)
| 392 | raise EOFError |
| 393 | |
| 394 | def restart_line(width, filename): # See bpo-38141. |
| 395 | """Return width long restart line formatted with filename. |
| 396 | |
| 397 | Fill line with balanced '='s, with any extras and at least one at |
| 398 | the beginning. Do not end with a trailing space. |
| 399 | """ |
| 400 | tag = f"= RESTART: {filename or 'Shell'} =" |
| 401 | if width >= len(tag): |
| 402 | div, mod = divmod((width -len(tag)), 2) |
| 403 | return f"{(div+mod)*'='}{tag}{div*'='}" |
| 404 | else: |
| 405 | return tag[:-2] # Remove ' ='. |
| 406 | |
| 407 | |
| 408 | class ModifiedInterpreter(InteractiveInterpreter): |
no outgoing calls
no test coverage detected
searching dependent graphs…