ruff/crates
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
..
flake8_to_ruff Unify line size settings between ruff and the formatter (#6873) 2023-08-28 06:44:56 +00:00
ruff Create ruff_notebook crate (#7039) 2023-09-01 13:56:44 +00:00
ruff_benchmark Add unicode benchmark (#7002) 2023-08-30 09:57:57 +02:00
ruff_cache Error on zero tab width (#6429) 2023-08-08 16:51:37 -04:00
ruff_cli Create ruff_notebook crate (#7039) 2023-09-01 13:56:44 +00:00
ruff_dev Create ruff_notebook crate (#7039) 2023-09-01 13:56:44 +00:00
ruff_diagnostics Create ruff_notebook crate (#7039) 2023-09-01 13:56:44 +00:00
ruff_formatter Update dynamic_text builder doc comment (#6978) 2023-08-29 16:29:11 +02:00
ruff_index Add unreachable code rule (#5384) 2023-07-04 14:27:23 +00:00
ruff_macros Move Configuration to ruff_workspace crate (#6920) 2023-08-28 06:21:35 +00:00
ruff_notebook Create ruff_notebook crate (#7039) 2023-09-01 13:56:44 +00:00
ruff_python_ast Fix WithItem ranges for parenthesized, non-as items (#6782) 2023-08-31 16:21:29 +01:00
ruff_python_codegen Make Parameters an optional field on ExprLambda (#6669) 2023-08-18 15:34:54 +00:00
ruff_python_formatter Match Black's formatting of trailing comments containing NBSP (#7030) 2023-09-01 14:52:59 +02:00
ruff_python_index Move Ranged into ruff_text_size (#6919) 2023-08-27 14:12:51 -04:00
ruff_python_literal Avoid parsing other parts of a format specification if replacements are present (#6858) 2023-08-25 17:42:57 +00:00
ruff_python_parser Fix WithItem ranges for parenthesized, non-as items (#6782) 2023-08-31 16:21:29 +01:00
ruff_python_resolver Replace .map_or(false, $closure) with .is_some_and(closure) (#6244) 2023-08-01 19:29:42 +02:00
ruff_python_semantic Move refurb/helpers utils to ruff_python_semantic for broader use (#6990) 2023-08-29 14:45:09 -04:00
ruff_python_stdlib Add TOML files to SourceType (#6929) 2023-08-28 15:01:48 +00:00
ruff_python_trivia Implement Ranged on more structs (#6921) 2023-08-27 19:03:08 +00:00
ruff_shrinking Move Ranged into ruff_text_size (#6919) 2023-08-27 14:12:51 -04:00
ruff_source_file Allow Locator#slice to take Ranged (#6922) 2023-08-28 11:08:39 -04:00
ruff_text_size Unify line size settings between ruff and the formatter (#6873) 2023-08-28 06:44:56 +00:00
ruff_wasm Add hidden --preview / --no-preview options to ruff check (#7009) 2023-08-31 09:51:59 -05:00
ruff_workspace Add hidden --preview / --no-preview options to ruff check (#7009) 2023-08-31 09:51:59 -05:00