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

Consider applying black and isort #527

Closed
mdickinson opened this issue Mar 13, 2023 · 1 comment · Fixed by #549
Closed

Consider applying black and isort #527

mdickinson opened this issue Mar 13, 2023 · 1 comment · Fixed by #549
Milestone

Comments

@mdickinson
Copy link
Member

We should consider applying black and isort prior to the Envisage 7.0 release.

@mdickinson mdickinson added this to the Release 7.0 milestone Mar 13, 2023
@mdickinson
Copy link
Member Author

If we do this, it should be backed up by CI checks, so that the codebase stays blackened and isorted.

mdickinson added a commit that referenced this issue Mar 23, 2023
This PR adds `black` and `isort` style formatting and checking, and
requires future code changes to comply with `black` and `isort` styles.

- New workflow `check-style.yml` that runs `black`, `isort` and `flake8`
checks
- Removes `flake8` check from test workflow
- `etstool.py` support for both checking and fixing style, via new
`style` command (with subcommands `fix` and `check`)
- removed old `flake8` command from `etstool.py`

Note: I'm installing the style-related packages from PyPI in
`etstool.py`, so that `etstool.py` and the new workflow are installing
the same package versions. I'm also fixing black to version 23.x so that
we don't suddenly get style failures for the first Black release in 2024
(or later years) - see Black's stability policy here:
https://black.readthedocs.io/en/stable/the_black_code_style/index.html#stability-policy

Closes #527
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 a pull request may close this issue.

1 participant