https://github.com/raybellwaves/ruff_format_notebook_test
https://github.com/raybellwaves/ruff_format_notebook_test
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/raybellwaves/ruff_format_notebook_test
- Owner: raybellwaves
- Created: 2023-11-08T14:33:41.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-08T16:40:57.000Z (over 1 year ago)
- Last Synced: 2025-02-01T11:41:28.868Z (4 months ago)
- Language: Jupyter Notebook
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Repo to show ruff formatter not working for notebooks in pre-commit
Create a notebook that needs formatting. It will contain a cell that looks like
`_l = [1, 2, 3,]`
Run it in a GitHub Action to show it passes pre-commit whereas it should fail.
You can see it works locally using ruff on the command line as:
```
git clone [email protected]:raybellwaves/ruff_format_notebook_test.git
cd ruff_format_notebook_test
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
ruff format . --check
```You can see it doesn't work using pre-commit as:
```
pre-commit run --all-files ruff
```