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

pre-commit isort and black --check only for cirrus-ci #4235

Merged

Conversation

bjlittle
Copy link
Member

@bjlittle bjlittle commented Jul 8, 2021

🚀 Pull Request

Description

This PR re-instates the pre-commit behaviour for the black and isort hooks, whereby they will automatically correct files in-place on git commit rather than performing a --check. This means that developers no longer require to explicitly install black or isort; this will all be managed by pre-commit.

Subsequently, the linting cirrus-ci task customises the pre-commit-config.yaml to ensure that black and isort only perform a --check, and will fail when a non-compliance is detected, as required.

Closes #4226


Consult Iris pull request check list

noxfile.py Outdated Show resolved Hide resolved
noxfile.py Outdated Show resolved Hide resolved
noxfile.py Outdated Show resolved Hide resolved
@bjlittle
Copy link
Member Author

bjlittle commented Jul 9, 2021

@trexfeathers Right, I'm done now, honest... I'm stepping away from the keyboard
🏃 ⌨️ 🤣

@bjlittle bjlittle removed the request for review from rcomer July 9, 2021 14:27
@trexfeathers trexfeathers merged commit 9a611ef into SciTools:main Jul 9, 2021
@rcomer
Copy link
Member

rcomer commented Jul 9, 2021

Thanks guys 🤩

@bjlittle bjlittle deleted the cirrus-ci-pre-commit-alt-config branch July 9, 2021 17:54
@bjlittle
Copy link
Member Author

@trexfeathers Awesome, thanks 🥂

tkknight added a commit to tkknight/iris that referenced this pull request Jul 21, 2021
* main: (43 commits)
  [pre-commit.ci] pre-commit autoupdate (SciTools#4244)
  Updated environment lockfiles (SciTools#4242)
  [pre-commit.ci] pre-commit autoupdate (SciTools#4239)
  Documented the --force option on conda env create (SciTools#4240)
  Updated environment lockfiles (SciTools#4237)
  pre-commit isort and black --check only for cirrus-ci (SciTools#4235)
  Only run docs-building sessions with Python 3.8. (SciTools#4210)
  consolidate cirrus-ci documentation tasks (SciTools#4219)
  Updated environment lockfiles (SciTools#4223)
  Replace pyke nopyke (SciTools#4198)
  drop cirrus-ci minimal tests (SciTools#4218)
  remove change management tech paper (SciTools#4217)
  [pre-commit.ci] pre-commit autoupdate (SciTools#4213)
  Updated environment lockfiles (SciTools#4212)
  Widen cube printout for long ancil or cell-measure names. (SciTools#4124)
  convert docs print statements (SciTools#4209)
  optimise pre-commit (SciTools#4208)
  drop black and flake8 dependencies (SciTools#4181)
  pre-commit blacked docs (SciTools#4205)
  pre-commit update (SciTools#4204)
  ...
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.

pre-commit, black and isort
3 participants