hildogjr / KiCost

Build cost spreadsheet for a KiCad project.
MIT License
496 stars 97 forks source link

Keep the components sorting #447

Closed set-soft closed 3 years ago

set-soft commented 3 years ago

This patch makes the components sorting consistent across Python versions. In particular for tests that check the generated file is exactly the same.

set-soft commented 3 years ago

Now Python 2.7 and 3.5 produce the same references generated by Python 3.7 and 3.9.

hildogjr commented 3 years ago

Interesting, for official docs:

Changed in version 3.8: Returns a regular dict instead of an OrderedDict. As of Python 3.7, regular dicts are guaranteed to be ordered. If the extra features of OrderedDict are required, the suggested remediation is to cast the result to the desired type: OrderedDict(nt._asdict()).