gh-37947: various ruff suggestions fixed in schemes
This is fixing some details, as suggested by `ruff` in the `schemes`
folder.
### :memo: Checklist
<!-- Put an `x` in all the boxes that apply. -->
- [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/37947
Reported by: Frédéric Chapoton
Reviewer(s): Travis Scrimshaw