Set up ruff as a linter
This is the first step towards #419 and the maintenance grant linked there.
As outlined in the maintenance grant, this PR is a first change aimed at ensuring code quality and consistency. None of the changes here are semver-breaking.
The actions are updated to use the most recent versions of standard actions. pre-commit is configured to aggregate all linters used in the project. Standard hooks (like end-of-line consistency fixer) will be added in a follow-up PR to keep this one minimal.
Docstring change is an example of correct style to be eventually applied everywhere else - note that it, unlike current docstring format, is correctly parsed by mkdocs and produces a human-readable table in the documentation.
This PR only enables a small subset of ruff rules, more will follow - for example, to ensure that docstrings are up-to-date and refer to correct arguments (as can be seen on SubstrateInterface.__init__, this is not true as of now).
The deployment workflow was tested on testPyPI here: https://github.com/sterliakov/py-polkadot-sdk/actions/runs/16008651302
The next step will be a big PR with ruff format enabled (and it, I hope, will be the last PR with a lot of changes batched together).
cc @emielsebastiaan
@emielsebastiaan any updates here?