Skip to content

Set up ruff as a linter#420

Open
sterliakov wants to merge 23 commits intoJAMdotTech:masterfrom
sterliakov:feature/st-gha-lint-test
Open

Set up ruff as a linter#420
sterliakov wants to merge 23 commits intoJAMdotTech:masterfrom
sterliakov:feature/st-gha-lint-test

Conversation

@sterliakov
Copy link
Copy Markdown

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).

@sterliakov
Copy link
Copy Markdown
Author

cc @emielsebastiaan

@sterliakov
Copy link
Copy Markdown
Author

@emielsebastiaan any updates here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant