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

Autoformatting: PEP8 via black & blitz .rst trailing whitespace #45

Merged
merged 6 commits into from
Apr 4, 2024

Conversation

sadielbartholomew
Copy link
Member

Close #16 and towards the closure of #17, though not closing the latter because here I have provided basic configuration for flake8 but not went through and addressed all of the errors and warnings it raises, which should be done in another PR since this one is pure (auto-)formatting and I don't want to mix in more significant changes.

In this PR I have:

  • added files to configure black and flake8, using the same config. as cf-python (which I will review shortly in case we want to update it for both libraries);
  • run black on all files in the codebase, via two commits (first for the cfplot directory for the main codebase, then anything else, mostly docs and setup files etc., by running from the repo root);
  • removed a file temp.py which was in the codebase but shouldn't be, leftover from Andy's files, as evidenced by it failing to be valid Python and supported by the name 'temp';
  • additionally removed all trailing whitespace in the .rst files that was raised by a nice tool called sphinx-lint, which I found because I was hoping to find a library that would allow me to apply black to the Python code snippets in the .rst but found this first and wanted to get rid of the vrey large amount of superfluous whitespace there first. I will investigate for a future PR on a possible black linter for the .rst Python snippets.

@sadielbartholomew sadielbartholomew self-assigned this Apr 4, 2024
@sadielbartholomew sadielbartholomew changed the title Autoformatting: PEP8 via black & removal of trailing whitespace in .rst Autoformatting: PEP8 via black & blitz .rst trailing whitespace Apr 4, 2024
@sadielbartholomew
Copy link
Member Author

This is all auto-formatting, with a large amount of line changes, so not suitable (read: would be tedious) for peer/code review, and I've applied sanity checks to ensure the code still runs fine after these (with new testing to come anyway), so I will merge.

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

Successfully merging this pull request may close these issues.

Apply code style standards systematically e.g. with black
1 participant