Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a linter to the Python code #755

Open
evertdeman opened this issue Dec 11, 2024 · 2 comments
Open

Add a linter to the Python code #755

evertdeman opened this issue Dec 11, 2024 · 2 comments
Labels
code Code best practices, style, linting distribution Issues with CI, PyPI, etc feature request Request for new features

Comments

@evertdeman
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The Python code does not follow standards like PEP8 and is inconsistent at times, even uses inconsistent white space (I have seen 3 spaces). Formatted code is much easier to read and maintain

Describe the solution you'd like
Lint the code with a tool like ruff which is really fast at checking, but also formatting code. Add a CI job that checks the code for style before merging any PRs

Describe alternatives you've considered
None really

@cookpa cookpa added feature request Request for new features code Code best practices, style, linting distribution Issues with CI, PyPI, etc labels Dec 11, 2024
@cookpa
Copy link
Member

cookpa commented Dec 11, 2024

I could work on including ruff, + black if we're really serious about enforcing a style.

But it would require sign-off from @stnava and @ntustison to install pre-commit hooks and make changes via PR. We can have an action auto-fix minor stuff (like trailing whitespace) on PRs.

@ntustison
Copy link
Member

It's fine with me. Thanks @cookpa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Code best practices, style, linting distribution Issues with CI, PyPI, etc feature request Request for new features
Projects
None yet
Development

No branches or pull requests

3 participants