Description
New
Adding linting and a format checker to wmfdata-python would be a great way to assure code consistency and quality (see issues in original task text below). This task would add a Python linter like Ruff (alternatively flake8) as well as a library to help with code formatting. For the latter we could make use of Ruff itself, black or autopep8. The Product Analytics Styleguide suggests PEP 8, but maybe we want to consider black in that it's now Python Software Foundation maintained and can integrate with Ruff.
Assuring that all the issues detailed in the original text below are warned for (and potentially autocorrected) would be the final step in this issue.
Original
Many of the Python files for wmfdata-python are using inconsistent formatting - specifically indentation of two and sometimes even three spaces. This task would go through and fix the various indentation problems such that all .py files would have indentation of four spaces. Along with this would also be included:
- Removing white space at the end of lines
- Making sure that all files end on a blank line (unsure if this is a problem, but a VS Code extension I have will do this)
- Fixing some links in the readmes
- Including this as I don't think that it's enough for its own task
- For example the "pull requests here on GitHub" hyper link in the README.md takes the visitor to /pulls as a directory in the package rather than /pulls the URL subdomain
Contribution
I'd be happy to work on this, and other suggestions would be welcome!