Show More
@@ -571,22 +571,6 def has_sunken_brackets(tokens: List[tokenize.TokenInfo]): | |||||
571 | return True |
|
571 | return True | |
572 | return False |
|
572 | return False | |
573 |
|
573 | |||
574 |
|
||||
575 | def show_linewise_tokens(s: str): |
|
|||
576 | """For investigation and debugging""" |
|
|||
577 | warnings.warn( |
|
|||
578 | "show_linewise_tokens is deprecated since IPython 8.6", |
|
|||
579 | DeprecationWarning, |
|
|||
580 | stacklevel=2, |
|
|||
581 | ) |
|
|||
582 | if not s.endswith("\n"): |
|
|||
583 | s += "\n" |
|
|||
584 | lines = s.splitlines(keepends=True) |
|
|||
585 | for line in make_tokens_by_line(lines): |
|
|||
586 | print("Line -------") |
|
|||
587 | for tokinfo in line: |
|
|||
588 | print(" ", tokinfo) |
|
|||
589 |
|
||||
590 | # Arbitrary limit to prevent getting stuck in infinite loops |
|
574 | # Arbitrary limit to prevent getting stuck in infinite loops | |
591 | TRANSFORM_LOOP_LIMIT = 500 |
|
575 | TRANSFORM_LOOP_LIMIT = 500 | |
592 |
|
576 |
General Comments 0
You need to be logged in to leave comments.
Login now