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

Apply code style standards systematically e.g. with black #16

Closed
sadielbartholomew opened this issue Feb 21, 2024 · 3 comments · Fixed by #45
Closed

Apply code style standards systematically e.g. with black #16

sadielbartholomew opened this issue Feb 21, 2024 · 3 comments · Fixed by #45
Assignees

Comments

@sadielbartholomew
Copy link
Member

Currently the codebase does not conform to PEP8 (and aligned) style conventions which are standard for Python code, for example it makes heavy use of old-style string formatting and has a large amount of trailing whitespace.

To avoid spending unnecessary time and effort to conform by such formatting, we should use a tool like black which will auto-format in a precise and absolute way as an extension of PEP8.

We can then use linters including pre-commit hooks to ensure that the style continues to abide by those standards (amongst other verifications).

@sadielbartholomew
Copy link
Member Author

As part of this, we should tidy import order with the isort tool.

@sadielbartholomew
Copy link
Member Author

I am hearing lots of good things about ruff, especially from those in the RSE community, so will probably go with that when I get around to doing this.

@sadielbartholomew
Copy link
Member Author

sadielbartholomew commented Apr 4, 2024

Since cf-python uses black at present (my choice from a while back), I will go with that instead of ruff for now. But we can always update that later for both libraries, in sync.

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

Successfully merging a pull request may close this issue.

1 participant