File: syntax_errors_formatting_cases.py

package info (click to toggle)
python-friendly-traceback 0.7.62%2Bgit20240811.d7dbff6-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,264 kB
  • sloc: python: 21,500; makefile: 4
file content (20 lines) | stat: -rw-r--r-- 545 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""In this file, descriptions is a dict whose keys are the names of
Python files that raise a SyntaxError (or subclass) when they are imported.
This is done from the file
/tests/formatting/catch_for_formatting_tsts.py
"""

where = "parsing_error_source"
cause = "cause"

descriptions = {}

descriptions["single_line"] = {}
descriptions["single_line"][where]= """\
       1| a = {'a': 1, 'b': 2 'c': 3,}
                            ^^^^^
"""
descriptions["single_line"][cause] = """\
    a = {'a': 1, 'b': 2, 'c': 3,}
                       ^
"""