ruff/crates/ruff_cli/src
Dhruv Manilawala 2fc38d81e6
Experimental release for Jupyter notebook integration (#5363)
## Summary

Experimental release for Jupyter Notebook integration.

Currently, this requires a user to explicitly opt-in using the
[include](https://beta.ruff.rs/docs/settings/#include) configuration:

```toml
[tool.ruff]
include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"]
```

Or, a user can pass in the file directly:

```sh
ruff check path/to/notebook.ipynb
```

For known limitations, please refer #5188 

## Test Plan

Following command should work without the `--all-features` flag:

```sh
cargo dev round-trip /path/to/notebook.ipynb
```

Following command should work with the above config file along with
`select = ["ALL"]`:

```sh
cargo run --bin ruff -- check --no-cache --config=../test-repos/openai-cookbook/pyproject.toml --fix ../test-repos/openai-cookbook/
```

Passing the Jupyter notebook directly:

```sh
cargo run --bin ruff -- check --no-cache --isolated --select=ALL --fix ../test-repos/openai-cookbook/examples/Classification_using_embeddings.ipynb
```
2023-06-26 21:22:42 +05:30
..
bin Add support for providing command-line arguments via argfile (#4087) 2023-04-25 17:58:21 -06:00
commands Initialize caches for packages and standalone files (#5237) 2023-06-21 17:29:09 +00:00
args.rs Add option (-o/--output-file) to write output to a file (#4950) 2023-06-20 22:16:49 +05:30
cache.rs Keep track of when files are last seen in the cache (#5214) 2023-06-23 15:40:35 +02:00
diagnostics.rs Experimental release for Jupyter notebook integration (#5363) 2023-06-26 21:22:42 +05:30
lib.rs Create PyFormatOptions 2023-06-26 14:02:17 +02:00
panic.rs Disallow unreachable_pub (#4314) 2023-05-11 18:00:00 -04:00
printer.rs Add option (-o/--output-file) to write output to a file (#4950) 2023-06-20 22:16:49 +05:30
resolve.rs Add a script that tests formatter stability on repositories (#5055) 2023-06-19 14:13:38 +00:00