gh-41305: some cleanup for S-unit solver
little pep8 cleanup in the modified file + some annotations
### :memo: Checklist
- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
URL: https://github.com/sagemath/sage/pull/41305
Reported by: Frédéric Chapoton
Reviewer(s):