chore: modernize Python tooling
As there is a lot of outdated components, it would be best to just to replace them with modern tools such as uv and ruff. In addition, I've added Lefthook so now we have linting and formatting pre-commit, so this would ensure that our code is linted and formatted. Alternatively, another way of doing this is to have a GH actions workflow that checks the code, and a rule ensures that the workflow must pass in order to merge
@No767 thanks for opening this PR. CI is not passing because python 3.7 is not supported on ubuntu latest, so I'd suggest removing "3.7" and "3.8" from the github workflow matrix as they are both EOL. 3.9 onwards seem to be supported.
About git pre-commit hooks, I think they're great, but they won't replace a CI check. In my mind, the pre-commit hook is a way for devs to save time because you don't need to wait for feedback from CI, but CI still needs to validate ("never trust the client" sort of thing).