mirror of https://github.com/python/cpython
Issue #20143: The line numbers reported in Argument Clinic errors are
now more accurate.
This commit is contained in:
parent
3f144c2ad7
commit
eb31e9d6ed
|
@ -16,6 +16,9 @@ Library
|
|||
Tools/Demos
|
||||
-----------
|
||||
|
||||
- Issue #20143: The line numbers reported in Argument Clinic errors are
|
||||
now more accurate.
|
||||
|
||||
- Issue #20142: Py_buffer variables generated by Argument Clinic are now
|
||||
initialized with a default value.
|
||||
|
||||
|
|
|
@ -943,8 +943,9 @@ class BlockParser:
|
|||
fail("Checksum mismatch!\nExpected: {}\nComputed: {}".format(checksum, computed))
|
||||
else:
|
||||
# put back output
|
||||
self.input.extend(reversed(output.splitlines(keepends=True)))
|
||||
self.line_number -= len(output)
|
||||
output_lines = output.splitlines(keepends=True)
|
||||
self.line_number -= len(output_lines)
|
||||
self.input.extend(reversed(output_lines))
|
||||
output = None
|
||||
|
||||
return Block(input_output(), dsl_name, output=output)
|
||||
|
|
Loading…
Reference in New Issue