ruff/crates
Alex Waygood c80c1712f0
[red-knot] Vendor typeshed's stdlib (#11340)
This PR vendors typeshed!

-  The first commit vendors the stdlib directory from typeshed into a new crates/red_knot/vendored_typeshed directory.
-  The second commit adjusts various linting config files to make sure that the vendored code is excluded from typo checks, formatting checks, etc.
-  The LICENSE and README.md files are also vendored, but all other directories and files (stubs, scripts, tests, test_cases, etc.) are excluded. We should have no need for them (except possibly stubs/, discussed in more depth below).
-  Similar to the way pyright has a commit.txt file in its vendored copy of typeshed, to indicate which typeshed commit the vendored code corresponds to, I've also added a crates/red_knot/vendored_typeshed/source_commit.txt file in the third commit of this PR.

One open question is: should we vendor the stdlib and stubs directories, or just the stdlib directory? The stubs/ directory contains stubs for 162 third-party packages outside the stdlib. Mypy and typeshed_client1 only vendor the stdlib directory; pyright and pyre vendor both the stdlib and stubs directories; pytype vendors the entire typeshed repo (scripts/, tests/ and all).

In this PR, I've chosen to copy mypy and typeshed_client. Unlike vendoring the stdlib, which is unavoidable if we want to do typechecking of the stdlib, it's not strictly necessary to vendor the stubs directory: each subdirectory in stubs is published to PyPI as a standalone stubs distribution that can be (uv)-pip-installed into a virtual environment. It might be useful for our users if we vendored those stubs anyway, but there are costs as well as benefits to doing so (apart from just the sheer amount of vendored code in the ruff repository), so I'd rather consider it separately.
2024-05-09 12:44:53 +01:00
..
red_knot [red-knot] Vendor typeshed's stdlib (#11340) 2024-05-09 12:44:53 +01:00
ruff [red-knot] Vendor typeshed's stdlib (#11340) 2024-05-09 12:44:53 +01:00
ruff_benchmark Run doctests as part of CI pipeline (#9939) 2024-02-12 10:18:58 +01:00
ruff_cache Kick off Red-knot (#10849) 2024-04-27 08:34:00 +00:00
ruff_dev Docs: Link inline settings when not part of options section (#10499) 2024-03-21 16:33:58 +00:00
ruff_diagnostics Respect # noqa directives on __all__ openers (#10798) 2024-04-06 14:51:17 +00:00
ruff_formatter Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
ruff_index Run doctests as part of CI pipeline (#9939) 2024-02-12 10:18:58 +01:00
ruff_linter Revert "Simplify arithmetic operation in logical lines checker (#11346)" (#11348) 2024-05-08 21:51:37 -04:00
ruff_macros Fix comment copy/paste typo in newtype_index (#10892) 2024-04-11 18:43:52 -06:00
ruff_notebook Remove unused dependencies (#10475) 2024-03-19 17:33:47 +01:00
ruff_python_ast Move all module from the AST to the semantic crate (#11330) 2024-05-08 08:56:50 +00:00
ruff_python_ast_integration_tests Remove cyclic dev dependency with the parser crate (#11261) 2024-05-07 09:24:57 +00:00
ruff_python_codegen Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
ruff_python_formatter Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
ruff_python_index Fix Indexer fails to identify continuation preceded by newline #10351 (#10354) 2024-03-12 00:35:41 -04:00
ruff_python_literal Remove unused dependencies (#10475) 2024-03-19 17:33:47 +01:00
ruff_python_parser Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
ruff_python_resolver chore(deps): update rust crate insta to v1.38.0 (#10701) 2024-04-01 15:44:30 +00:00
ruff_python_semantic Improve ruff_python_semantic::all::extract_all_names() (#11335) 2024-05-08 17:09:31 +01:00
ruff_python_stdlib Improve handling of builtin symbols in linter rules (#10919) 2024-04-16 11:37:31 +01:00
ruff_python_trivia Remove cyclic dev dependency with the parser crate (#11261) 2024-05-07 09:24:57 +00:00
ruff_python_trivia_integration_tests Remove cyclic dev dependency with the parser crate (#11261) 2024-05-07 09:24:57 +00:00
ruff_server Touch-up error messages in server file discovery (#11285) 2024-05-05 13:20:51 -04:00
ruff_source_file Remove cyclic dev dependency with the parser crate (#11261) 2024-05-07 09:24:57 +00:00
ruff_text_size Range formatting: Fix invalid syntax after parenthesizing expression (#9751) 2024-02-02 17:56:25 +01:00
ruff_wasm Remove ImportMap (#11234) 2024-05-02 11:26:02 -07:00
ruff_workspace Add globbing to isort sections docs (#11311) 2024-05-06 18:12:29 +00:00