Whole file

terryyin/lizard

The author described this change as Fix incorrect python function end line when function declared with multiple lines. It counts as a record because the check below fails on the code as it stood at e6758034a and passes on a79aa8c95, with nothing else changed between the two runs.

Fix saved2022-03-16
Sharing licenceMIT · LICENSE.txt
Change size+3 1

What the code was meant to do, written into the code itself as a save note

Fix incorrect python function end line when function declared with multiple lines

The change

5353 current_leading_spaces += count_spaces(token)
5454 else:
5555 if not token.startswith('#'):
56- indents.set_nesting(current_leading_spaces, token)
56+ current_function = self.context.current_function
57+ if current_function.name == '*global*' or current_function.long_name.endswith(')'):
58+ indents.set_nesting(current_leading_spaces, token)
5759 reading_leading_space = False
5860 else:
5961 reading_leading_space = True

The check that tells the two apart

failpass·test/test_languages/testPython.py::Test_parser_for_Python::test_multi_line_function_def_function_end

Check file test/test_languages/testPython.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before ite6758034a64589f13bdf11dac76f812bc3399518
Broken version dated2022-03-08
Modulelizard_languages.python
Units changedPythonReader
Fingerprint87d4d566f8dc9b9f
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in terryyin/lizard