Whole file

bwhmather/ssort

The author described this change as Fix lambda requirements with walrus operator. It counts as a record because the check below fails on the code as it stood at 65c4b0a1f and passes on 1cfea30d0, with nothing else changed between the two runs.

Fix saved2022-07-22
Sharing licenceMIT · LICENSE
Change size+1 0

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

Fix lambda requirements with walrus operator

The change

161161 def _get_requirements_for_lambda(node: ast.Lambda) -> Iterable[Requirement]:
162162 yield from get_requirements(node.args)
163163 scope = _get_scope_from_arguments(node.args)
164+ scope.update(get_bindings(node.body))
164165 for requirement in get_requirements(node.body):
165166 if requirement.name not in scope:
166167 yield requirement

The check that tells the two apart

failpass·tests/test_requirements.py::test_lambda_requirements_walrus_operator

Check file tests/test_requirements.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 it65c4b0a1f2e9e93e65855967f9a438046b24d9e1
Broken version dated2022-05-16
Modulessort._requirements
Units changed_get_requirements_for_lambda
Fingerprint08f2aa55bee571d9
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 bwhmather/ssort