Closed ericbn closed 5 months ago
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
src/ssort/_parsing.py | 8 | 9 | 88.89% | ||
<!-- | Total: | 82 | 83 | 98.8% | --> |
Totals | |
---|---|
Change from base Build 7702612545: | 0.002% |
Covered Lines: | 1356 |
Relevant Lines: | 1380 |
I think this is just about done. Should have time this evening to do a full read through then will merge and bake a release.
Cool! I've reverted _optional_nested_brackets. The reason I didn't want to hoist it was because I thought it would have a weird signature, as if depends on both token and tokens, and mutates token:
token = _optional_nested_brackets(token, tokens, "[", "]")
token = _optional_nested_brackets(token, tokens, "(", ")")
Instead, I think this would be better refactored as a having split_class become a class and _optional_nested_brackets a private method, with token and tokens being instance attributes. I tried a similar effect first by having _optional_nested_brackets as a closure.
Also update tox and GitHub Actions to use Python 3.12 by default.