ruff/crates/ruff_dev/src
Charlie Marsh afcd00da56
Create ruff_notebook crate (#7039)
## Summary

This PR moves `ruff/jupyter` into its own `ruff_notebook` crate. Beyond
the move itself, there were a few challenges:

1. `ruff_notebook` relies on the source map abstraction. I've moved the
source map into `ruff_diagnostics`, since it doesn't have any
dependencies on its own and is used alongside diagnostics.
2. `ruff_notebook` has a couple tests for end-to-end linting and
autofixing. I had to leave these tests in `ruff` itself.
3. We had code in `ruff/jupyter` that relied on Python lexing, in order
to provide a more targeted error message in the event that a user saves
a `.py` file with a `.ipynb` extension. I removed this in order to avoid
a dependency on the parser, it felt like it wasn't worth retaining just
for that dependency.

## Test Plan

`cargo test`
2023-09-01 13:56:44 +00:00
..
format_dev.rs Show changed files (#7003) 2023-08-30 06:47:45 +00:00
generate_all.rs Document ruff_dev and format_dev (#5648) 2023-07-12 16:18:22 +02:00
generate_cli_help.rs Use mod tests consistently (#5278) 2023-06-22 01:50:28 +00:00
generate_docs.rs Move Configuration to ruff_workspace crate (#6920) 2023-08-28 06:21:35 +00:00
generate_json_schema.rs Move Configuration to ruff_workspace crate (#6920) 2023-08-28 06:21:35 +00:00
generate_options.rs Move Configuration to ruff_workspace crate (#6920) 2023-08-28 06:21:35 +00:00
generate_rules_table.rs Move Configuration to ruff_workspace crate (#6920) 2023-08-28 06:21:35 +00:00
main.rs Narrow the supported options on the format CLI (#6944) 2023-08-28 15:28:22 +00:00
print_ast.rs Use Jupyter mode while parsing Notebook files (#5552) 2023-08-05 00:32:07 +00:00
print_cst.rs Disallow unreachable_pub (#4314) 2023-05-11 18:00:00 -04:00
print_tokens.rs Use Jupyter mode while parsing Notebook files (#5552) 2023-08-05 00:32:07 +00:00
round_trip.rs Create ruff_notebook crate (#7039) 2023-09-01 13:56:44 +00:00