ruff/crates/ruff_python_stdlib/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
..
builtins.rs Rename ruff_python crate to ruff_python_stdlib (#3354) 2023-03-06 13:43:22 +00:00
future.rs Rename ruff_python crate to ruff_python_stdlib (#3354) 2023-03-06 13:43:22 +00:00
identifiers.rs Move keyword checks into is_identifier (#3834) 2023-03-31 16:56:33 -04:00
keyword.rs Move keyword checks into is_identifier (#3834) 2023-03-31 16:56:33 -04:00
lib.rs Introduce a ruff_python_semantic crate (#3865) 2023-04-04 16:50:47 +00:00
logging.rs Introduce a ruff_python_semantic crate (#3865) 2023-04-04 16:50:47 +00:00
path.rs Experimental release for Jupyter notebook integration (#5363) 2023-06-26 21:22:42 +05:30
str.rs Avoid allocations in lowercase comparisons (#5137) 2023-06-16 08:57:43 -04:00
sys.rs Remove HashMap and HashSet for known-standard-library detection (#5345) 2023-06-23 19:59:03 +00:00
typing.rs Replace static CallPath vectors with matches! macros (#5148) 2023-06-16 17:34:42 +00:00