Crash when reporting error in a codeblock #18

Open
opened 2025-05-29 14:50:12 +02:00 by StanFromIreland · 0 comments
Contributor

This occurs here:

Traceback (most recent call last):
<rst-doc>:3: (ERROR/3) Unexpected indentation. while parsing: # punkt to dwukrotka (x, y)
match point:
    case (0, 0):
        print("Początek")
    case (0, y):
        print(f"Y={y}")
    case (x, 0):
        print(f"X={x}")
    case (x, y):
        print(f"X={x}, Y={y}")
    case _:
        raise ValueError("Nie punkt")
  File "/opt/hostedtoolcache/Python/3.13.3/x64/bin/pospell", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/opt/hostedtoolcache/Python/3.13.3/x64/lib/python3.13/site-packages/pospell.py", line 480, in main
    errors = spell_check(
        args.po_file,
    ...<4 lines>...
        args.jobs,
    )
  File "/opt/hostedtoolcache/Python/3.13.3/x64/lib/python3.13/site-packages/pospell.py", line 384, in spell_check
    errors = flatten(
        pool.map(
    ...<2 lines>...
        )
    )
  File "/opt/hostedtoolcache/Python/3.13.3/x64/lib/python3.13/site-packages/pospell.py", line 342, in flatten
    return [element for a_list in list_of_lists for element in a_list]
                                                               ^^^^^^
TypeError: 'int' object is not iterable

Problematic msgstr: github.com/python/python-docs-pl@ee77dd076d/tutorial/controlflow.po (L640)

This occurs here: ``` Traceback (most recent call last): <rst-doc>:3: (ERROR/3) Unexpected indentation. while parsing: # punkt to dwukrotka (x, y) match point: case (0, 0): print("Początek") case (0, y): print(f"Y={y}") case (x, 0): print(f"X={x}") case (x, y): print(f"X={x}, Y={y}") case _: raise ValueError("Nie punkt") File "/opt/hostedtoolcache/Python/3.13.3/x64/bin/pospell", line 8, in <module> sys.exit(main()) ~~~~^^ File "/opt/hostedtoolcache/Python/3.13.3/x64/lib/python3.13/site-packages/pospell.py", line 480, in main errors = spell_check( args.po_file, ...<4 lines>... args.jobs, ) File "/opt/hostedtoolcache/Python/3.13.3/x64/lib/python3.13/site-packages/pospell.py", line 384, in spell_check errors = flatten( pool.map( ...<2 lines>... ) ) File "/opt/hostedtoolcache/Python/3.13.3/x64/lib/python3.13/site-packages/pospell.py", line 342, in flatten return [element for a_list in list_of_lists for element in a_list] ^^^^^^ TypeError: 'int' object is not iterable ``` Problematic msgstr: https://github.com/python/python-docs-pl/blob/ee77dd076d5adb3d1573e6d8cbe7f6a8908e52d3/tutorial/controlflow.po#L640
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AFPy/pospell#18
No description provided.