mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 10:23:11 +00:00
![]() ## Summary LangChain is attempting to use Ruff over their Jupyter notebooks (https://github.com/langchain-ai/langchain/pull/12677/files), but running into a bunch of syntax errors, the majority of which come from our inability to recognize automagic. If you run this in a cell: ```jupyter pip install requests ``` Jupyter will automatically treat that as: ```jupyter %pip install requests ``` We need to ignore cells that use these automagics, since the parser doesn't understand them. (I guess we could support it in the parser, but that seems much harder?). The good news is that AFAICT Jupyter doesn't let you mix automagics with code, so by skipping these cells, we don't miss out on analyzing any Python code. ## Test Plan 1. `cargo test` 2. Ran over LangChain and verified that there are no more errors relating to `pip install` automagics. |
||
---|---|---|
.. | ||
resources/test/fixtures/jupyter | ||
src | ||
Cargo.toml |