-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Skip notebook with errors in ecosystem check #19491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Summary -- I've been noticing this failure in the formatter ecosystem check and decide to look into it. We fail to parse the notebook because some of the `code` cells have non-Python code in them. `ruff format` only reports one of these, corresponding to a shell snippet, but `ruff check` emits some additional errors about JS code later in the file too. Test Plan -- This PR
|
|
Looks like there are more notebooks with the same issues. I'll pull down the whole repo and try to find them all. |
MichaReiser
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
|
It looks like the other notebooks were already in the |
* main: [ty] Use `ThinVec` for sub segments in `PlaceExpr` (#19470) [ty] Splat variadic arguments into parameter list (#18996) [`flake8-pyi`] Skip fix if all `Union` members are `None` (`PYI016`) (#19416) Skip notebook with errors in ecosystem check (#19491) [ty] Consistent use of American english (in rules) (#19488) [ty] Support iterating over enums (#19486) Fix panic for illegal `Literal[…]` annotations with inner subscript expressions (#19489) Move fix suggestion to subdiagnostic (#19464) [ty] Implement non-stdlib stub mapping for classes and functions (#19471) [ty] Disallow illegal uses of `ClassVar` (#19483) [ty] Disallow `Final` in function parameter/return-type annotations (#19480) [ty] Extend `Final` test suite (#19476) [ty] Minor change to diagnostic message for invalid Literal uses (#19482) [ty] Detect illegal non-enum attribute accesses in Literal annotation (#19477) [ty] Reduce size of `TypeInference` (#19435) Run MD tests for Markdown-only changes (#19479) Revert "[ty] Detect illegal non-enum attribute accesses in Literal annotation" [ty] Detect illegal non-enum attribute accesses in Literal annotation [ty] Added semantic token support for more identifiers (#19473) [ty] Make tuple subclass constructors sound (#19469)
* main: (28 commits) [ty] highlight the argument in `static_assert` error messages (astral-sh#19426) [ty] Infer single-valuedness for enums based on `int`/`str` (astral-sh#19510) [ty] Restructure submodule query around `File` dependency [ty] Make `Module` a Salsa ingredient [ty] Reachability analysis for `isinstance(…)` branches (astral-sh#19503) [ty] Normalize single-member enums to their instance type (astral-sh#19502) [ty] Invert `ty_ide` and `ty_project` dependency (astral-sh#19501) [ty] Implement mock language server for testing (astral-sh#19391) [ty] Detect enums if metaclass is a subtype of EnumType/EnumMeta (astral-sh#19481) [ty] perform type narrowing for places marked `global` too (astral-sh#19381) [ty] Use `ThinVec` for sub segments in `PlaceExpr` (astral-sh#19470) [ty] Splat variadic arguments into parameter list (astral-sh#18996) [`flake8-pyi`] Skip fix if all `Union` members are `None` (`PYI016`) (astral-sh#19416) Skip notebook with errors in ecosystem check (astral-sh#19491) [ty] Consistent use of American english (in rules) (astral-sh#19488) [ty] Support iterating over enums (astral-sh#19486) Fix panic for illegal `Literal[…]` annotations with inner subscript expressions (astral-sh#19489) Move fix suggestion to subdiagnostic (astral-sh#19464) [ty] Implement non-stdlib stub mapping for classes and functions (astral-sh#19471) [ty] Disallow illegal uses of `ClassVar` (astral-sh#19483) ... # Conflicts: # crates/ty_ide/src/goto.rs
Summary -- I've been noticing this failure in the formatter ecosystem check and decided to look into it. We fail to parse the [notebook](https://github.com/openai/openai-cookbook/blob/main/examples/mcp/databricks_mcp_cookbook.ipynb) because some of the `code` cells have non-Python code in them. `ruff format` only reports one of these, corresponding to a shell snippet, but `ruff check` emits some additional errors about JS code later in the file too: ``` databricks_mcp_cookbook.ipynb:cell 21:1:11: SyntaxError: Simple statements must be separated by newlines or semicolons databricks_mcp_cookbook.ipynb:cell 21:1:19: SyntaxError: Simple statements must be separated by newlines or semicolons databricks_mcp_cookbook.ipynb:cell 21:1:50: SyntaxError: Simple statements must be separated by newlines or semicolons databricks_mcp_cookbook.ipynb:cell 30:4:7: SyntaxError: Simple statements must be separated by newlines or semicolons databricks_mcp_cookbook.ipynb:cell 30:4:41: E703 Statement ends with an unnecessary semicolon databricks_mcp_cookbook.ipynb:cell 30:5:14: SyntaxError: Expected ':', found '{' databricks_mcp_cookbook.ipynb:cell 30:6:9: SyntaxError: Expected ',', found '{' databricks_mcp_cookbook.ipynb:cell 30:6:25: SyntaxError: Expected ',', found '=' databricks_mcp_cookbook.ipynb:cell 30:6:46: SyntaxError: Expected ',', found ';' databricks_mcp_cookbook.ipynb:cell 30:6:47: SyntaxError: Expected '}', found newline databricks_mcp_cookbook.ipynb:cell 30:7:1: SyntaxError: Unexpected indentation databricks_mcp_cookbook.ipynb:cell 30:7:13: SyntaxError: Expected ':', found 'break' databricks_mcp_cookbook.ipynb:cell 30:7:18: E703 Statement ends with an unnecessary semicolon databricks_mcp_cookbook.ipynb:cell 30:8:28: SyntaxError: Simple statements must be separated by newlines or semicolons databricks_mcp_cookbook.ipynb:cell 30:8:55: E703 Statement ends with an unnecessary semicolon databricks_mcp_cookbook.ipynb:cell 30:9:18: SyntaxError: Expected an expression databricks_mcp_cookbook.ipynb:cell 30:10:11: SyntaxError: Expected ',', found name databricks_mcp_cookbook.ipynb:cell 30:10:16: SyntaxError: Expected ',', found '=' databricks_mcp_cookbook.ipynb:cell 30:10:22: SyntaxError: Expected ',', found name databricks_mcp_cookbook.ipynb:cell 30:10:24: SyntaxError: Expected ',', found ';' databricks_mcp_cookbook.ipynb:cell 30:11:27: SyntaxError: Expected ',', found '=' databricks_mcp_cookbook.ipynb:cell 30:11:34: SyntaxError: Expected ',', found name databricks_mcp_cookbook.ipynb:cell 30:11:48: SyntaxError: Expected ',', found ';' databricks_mcp_cookbook.ipynb:cell 30:11:49: SyntaxError: Expected '}', found NonLogicalNewline databricks_mcp_cookbook.ipynb:cell 30:12:1: SyntaxError: Unexpected indentation databricks_mcp_cookbook.ipynb:cell 30:12:16: E703 Statement ends with an unnecessary semicolon databricks_mcp_cookbook.ipynb:cell 30:13:3: SyntaxError: Expected a statement databricks_mcp_cookbook.ipynb:cell 30:13:4: SyntaxError: Expected a statement databricks_mcp_cookbook.ipynb:cell 30:13:5: SyntaxError: Expected a statement databricks_mcp_cookbook.ipynb:cell 30:13:5: E703 Statement ends with an unnecessary semicolon databricks_mcp_cookbook.ipynb:cell 30:13:6: SyntaxError: Expected a statement databricks_mcp_cookbook.ipynb:cell 30:14:1: SyntaxError: Expected a statement databricks_mcp_cookbook.ipynb:cell 30:14:2: SyntaxError: Expected a statement ``` Test Plan -- This PR
Summary
I've been noticing this failure in the formatter ecosystem check and decided to
look into it. We fail to parse the notebook because some of the
codecellshave non-Python code in them.
ruff formatonly reports one of these,corresponding to a shell snippet, but
ruff checkemits some additional errorsabout JS code later in the file too:
Test Plan
This PR