Fix up pre-commit formatting
Signed-off-by: Michael Tiemann <72577720+MichaelTiemannOSC@users.noreply.github.com>
f6fbcc0
1 year ago
by MichaelTiemannOSC
-20%
Update CHANGES
Signed-off-by: Michael Tiemann <72577720+MichaelTiemannOSC@users.noreply.github.com>
65fd12c
1 year ago
by MichaelTiemannOSC
+20%
Update test_issues.py
Remove `breakpoint`s that should have been linted out by pre-commit.
Signed-off-by: Michael Tiemann <72577720+MichaelTiemannOSC@users.noreply.github.com>
4551586
1 year ago
by MichaelTiemannOSC
-20%
Ensure called `default_sort_func` is not None
It would be easier to just default to `sorted` instead of `None`, but since `None` is an option, we have to test for it anyway.
Signed-off-by: Michael Tiemann <72577720+MichaelTiemannOSC@users.noreply.github.com>
7b9bc34
1 year ago
by MichaelTiemannOSC
0%
Fix default_sort_func
The default sort function needs to be able to handle a registry passed to it, so to make `sorted` the default behavior, we have to create a lambda that strips the registry parameter before calling `sorted`.
Signed-off-by: Michael Tiemann <72577720+MichaelTiemannOSC@users.noreply.github.com>
a47b5e9
1 year ago
by MichaelTiemannOSC
0%
Refactor sort_func into `format_compound_unit`
This is a much more logical place to put it. Note that the default formatters (plain, html, latex) all now call `formatter` with sort_func=None so that we don't accidentally use `sorted` as a default argument. But those who call `formatter` directly for their own purposes can call with a sort_func of their choosing that will do what they want it to do.
This also fixes a latent bug where we failed to call `sort_func` in one of the paths of `plain.py`.
Signed-off-by: Michael Tiemann <72577720+MichaelTiemannOSC@users.noreply.github.com>