One function

_get_bindings_for_import in bwhmather/ssort

The author described this change as Fix binding only root module in nested imports. It counts as a record because the check below fails on the code as it stood at 31c5bf7a7 and passes on a0acd5cdc, with nothing else changed between the two runs.

Fix saved2021-04-06
Sharing licenceMIT · LICENSE
Change size+5 1

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

..code:: python Import(alias* names)

The change

55 Import(alias* names)
66 """
77 for name in node.names:
8- yield name.asname if name.asname else name.name
8+ if name.asname:
9+ yield name.asname
10+ else:
11+ root, *rest = name.name.split(".", 1)
12+ yield root

The check that tells the two apart

failpass·tests/test_bindings.py::test_import_bindings_nested

Check file tests/test_bindings.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 it31c5bf7a702d23ec3e938816614d054ef22dbfcf
Broken version dated2021-04-06
Modulessort._bindings
Units changed_get_bindings_for_import
Fingerprint10f96b2e0b9125ff
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