mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 22:01:47 +00:00
Rename the ruff_vendored
crate to red_knot_vendored
(#13586)
This commit is contained in:
parent
cfd5d63917
commit
82324678cf
595 changed files with 37 additions and 37 deletions
14
.github/workflows/sync_typeshed.yaml
vendored
14
.github/workflows/sync_typeshed.yaml
vendored
|
@ -37,13 +37,13 @@ jobs:
|
||||||
- name: Sync typeshed
|
- name: Sync typeshed
|
||||||
id: sync
|
id: sync
|
||||||
run: |
|
run: |
|
||||||
rm -rf ruff/crates/ruff_vendored/vendor/typeshed
|
rm -rf ruff/crates/red_knot_vendored/vendor/typeshed
|
||||||
mkdir ruff/crates/ruff_vendored/vendor/typeshed
|
mkdir ruff/crates/red_knot_vendored/vendor/typeshed
|
||||||
cp typeshed/README.md ruff/crates/ruff_vendored/vendor/typeshed
|
cp typeshed/README.md ruff/crates/red_knot_vendored/vendor/typeshed
|
||||||
cp typeshed/LICENSE ruff/crates/ruff_vendored/vendor/typeshed
|
cp typeshed/LICENSE ruff/crates/red_knot_vendored/vendor/typeshed
|
||||||
cp -r typeshed/stdlib ruff/crates/ruff_vendored/vendor/typeshed/stdlib
|
cp -r typeshed/stdlib ruff/crates/red_knot_vendored/vendor/typeshed/stdlib
|
||||||
rm -rf ruff/crates/ruff_vendored/vendor/typeshed/stdlib/@tests
|
rm -rf ruff/crates/red_knot_vendored/vendor/typeshed/stdlib/@tests
|
||||||
git -C typeshed rev-parse HEAD > ruff/crates/ruff_vendored/vendor/typeshed/source_commit.txt
|
git -C typeshed rev-parse HEAD > ruff/crates/red_knot_vendored/vendor/typeshed/source_commit.txt
|
||||||
- name: Commit the changes
|
- name: Commit the changes
|
||||||
id: commit
|
id: commit
|
||||||
if: ${{ steps.sync.outcome == 'success' }}
|
if: ${{ steps.sync.outcome == 'success' }}
|
||||||
|
|
|
@ -2,7 +2,7 @@ fail_fast: true
|
||||||
|
|
||||||
exclude: |
|
exclude: |
|
||||||
(?x)^(
|
(?x)^(
|
||||||
crates/ruff_vendored/vendor/.*|
|
crates/red_knot_vendored/vendor/.*|
|
||||||
crates/red_knot_workspace/resources/.*|
|
crates/red_knot_workspace/resources/.*|
|
||||||
crates/ruff_linter/resources/.*|
|
crates/ruff_linter/resources/.*|
|
||||||
crates/ruff_linter/src/rules/.*/snapshots/.*|
|
crates/ruff_linter/src/rules/.*/snapshots/.*|
|
||||||
|
|
26
Cargo.lock
generated
26
Cargo.lock
generated
|
@ -2084,6 +2084,7 @@ dependencies = [
|
||||||
"hashbrown",
|
"hashbrown",
|
||||||
"insta",
|
"insta",
|
||||||
"ordermap",
|
"ordermap",
|
||||||
|
"red_knot_vendored",
|
||||||
"ruff_db",
|
"ruff_db",
|
||||||
"ruff_index",
|
"ruff_index",
|
||||||
"ruff_python_ast",
|
"ruff_python_ast",
|
||||||
|
@ -2092,7 +2093,6 @@ dependencies = [
|
||||||
"ruff_python_stdlib",
|
"ruff_python_stdlib",
|
||||||
"ruff_source_file",
|
"ruff_source_file",
|
||||||
"ruff_text_size",
|
"ruff_text_size",
|
||||||
"ruff_vendored",
|
|
||||||
"rustc-hash 2.0.0",
|
"rustc-hash 2.0.0",
|
||||||
"salsa",
|
"salsa",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
|
@ -2127,6 +2127,17 @@ dependencies = [
|
||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "red_knot_vendored"
|
||||||
|
version = "0.0.0"
|
||||||
|
dependencies = [
|
||||||
|
"once_cell",
|
||||||
|
"path-slash",
|
||||||
|
"ruff_db",
|
||||||
|
"walkdir",
|
||||||
|
"zip",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "red_knot_wasm"
|
name = "red_knot_wasm"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
|
@ -2152,11 +2163,11 @@ dependencies = [
|
||||||
"notify",
|
"notify",
|
||||||
"rayon",
|
"rayon",
|
||||||
"red_knot_python_semantic",
|
"red_knot_python_semantic",
|
||||||
|
"red_knot_vendored",
|
||||||
"ruff_cache",
|
"ruff_cache",
|
||||||
"ruff_db",
|
"ruff_db",
|
||||||
"ruff_python_ast",
|
"ruff_python_ast",
|
||||||
"ruff_text_size",
|
"ruff_text_size",
|
||||||
"ruff_vendored",
|
|
||||||
"rustc-hash 2.0.0",
|
"rustc-hash 2.0.0",
|
||||||
"salsa",
|
"salsa",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
|
@ -2790,17 +2801,6 @@ dependencies = [
|
||||||
"static_assertions",
|
"static_assertions",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "ruff_vendored"
|
|
||||||
version = "0.0.0"
|
|
||||||
dependencies = [
|
|
||||||
"once_cell",
|
|
||||||
"path-slash",
|
|
||||||
"ruff_db",
|
|
||||||
"walkdir",
|
|
||||||
"zip",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ruff_wasm"
|
name = "ruff_wasm"
|
||||||
version = "0.6.8"
|
version = "0.6.8"
|
||||||
|
|
|
@ -34,7 +34,7 @@ ruff_python_trivia = { path = "crates/ruff_python_trivia" }
|
||||||
ruff_server = { path = "crates/ruff_server" }
|
ruff_server = { path = "crates/ruff_server" }
|
||||||
ruff_source_file = { path = "crates/ruff_source_file" }
|
ruff_source_file = { path = "crates/ruff_source_file" }
|
||||||
ruff_text_size = { path = "crates/ruff_text_size" }
|
ruff_text_size = { path = "crates/ruff_text_size" }
|
||||||
ruff_vendored = { path = "crates/ruff_vendored" }
|
red_knot_vendored = { path = "crates/red_knot_vendored" }
|
||||||
ruff_workspace = { path = "crates/ruff_workspace" }
|
ruff_workspace = { path = "crates/ruff_workspace" }
|
||||||
|
|
||||||
red_knot_python_semantic = { path = "crates/red_knot_python_semantic" }
|
red_knot_python_semantic = { path = "crates/red_knot_python_semantic" }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[files]
|
[files]
|
||||||
# https://github.com/crate-ci/typos/issues/868
|
# https://github.com/crate-ci/typos/issues/868
|
||||||
extend-exclude = ["crates/ruff_vendored/vendor/**/*", "**/resources/**/*", "**/snapshots/**/*"]
|
extend-exclude = ["crates/red_knot_vendored/vendor/**/*", "**/resources/**/*", "**/snapshots/**/*"]
|
||||||
|
|
||||||
[default.extend-words]
|
[default.extend-words]
|
||||||
"arange" = "arange" # e.g. `numpy.arange`
|
"arange" = "arange" # e.g. `numpy.arange`
|
||||||
|
|
|
@ -37,7 +37,7 @@ test-case = { workspace = true }
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
ruff_db = { workspace = true, features = ["os", "testing"] }
|
ruff_db = { workspace = true, features = ["os", "testing"] }
|
||||||
ruff_python_parser = { workspace = true }
|
ruff_python_parser = { workspace = true }
|
||||||
ruff_vendored = { workspace = true }
|
red_knot_vendored = { workspace = true }
|
||||||
|
|
||||||
anyhow = { workspace = true }
|
anyhow = { workspace = true }
|
||||||
insta = { workspace = true }
|
insta = { workspace = true }
|
||||||
|
|
|
@ -32,7 +32,7 @@ pub(crate) mod tests {
|
||||||
Self {
|
Self {
|
||||||
storage: salsa::Storage::default(),
|
storage: salsa::Storage::default(),
|
||||||
system: TestSystem::default(),
|
system: TestSystem::default(),
|
||||||
vendored: ruff_vendored::file_system().clone(),
|
vendored: red_knot_vendored::file_system().clone(),
|
||||||
events: std::sync::Arc::default(),
|
events: std::sync::Arc::default(),
|
||||||
files: Files::default(),
|
files: Files::default(),
|
||||||
}
|
}
|
||||||
|
|
|
@ -391,7 +391,7 @@ mod tests {
|
||||||
let db = TestDb::new();
|
let db = TestDb::new();
|
||||||
let vendored_typeshed_versions = vendored_typeshed_versions(&db);
|
let vendored_typeshed_versions = vendored_typeshed_versions(&db);
|
||||||
let vendored_typeshed_dir =
|
let vendored_typeshed_dir =
|
||||||
Path::new(env!("CARGO_MANIFEST_DIR")).join("../ruff_vendored/vendor/typeshed");
|
Path::new(env!("CARGO_MANIFEST_DIR")).join("../red_knot_vendored/vendor/typeshed");
|
||||||
|
|
||||||
let mut empty_iterator = true;
|
let mut empty_iterator = true;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "ruff_vendored"
|
name = "red_knot_vendored"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
publish = false
|
publish = false
|
||||||
authors = { workspace = true }
|
authors = { workspace = true }
|
|
@ -1,5 +1,5 @@
|
||||||
# Vendored types for the stdlib
|
# Vendored types for the stdlib
|
||||||
|
|
||||||
This crate vendors [typeshed](https://github.com/python/typeshed)'s stubs for the standard library. The vendored stubs can be found in `crates/ruff_vendored/vendor/typeshed`. The file `crates/ruff_vendored/vendor/typeshed/source_commit.txt` tells you the typeshed commit that our vendored stdlib stubs currently correspond to.
|
This crate vendors [typeshed](https://github.com/python/typeshed)'s stubs for the standard library. The vendored stubs can be found in `crates/red_knot_vendored/vendor/typeshed`. The file `crates/red_knot_vendored/vendor/typeshed/source_commit.txt` tells you the typeshed commit that our vendored stdlib stubs currently correspond to.
|
||||||
|
|
||||||
The typeshed stubs are updated every two weeks via an automated PR using the `sync_typeshed.yaml` workflow in the `.github/workflows` directory. This workflow can also be triggered at any time via [workflow dispatch](https://docs.github.com/en/actions/using-workflows/manually-running-a-workflow#running-a-workflow).
|
The typeshed stubs are updated every two weeks via an automated PR using the `sync_typeshed.yaml` workflow in the `.github/workflows` directory. This workflow can also be triggered at any time via [workflow dispatch](https://docs.github.com/en/actions/using-workflows/manually-running-a-workflow#running-a-workflow).
|
|
@ -3,7 +3,7 @@
|
||||||
//!
|
//!
|
||||||
//! This script should be automatically run at build time
|
//! This script should be automatically run at build time
|
||||||
//! whenever the script itself changes, or whenever any files
|
//! whenever the script itself changes, or whenever any files
|
||||||
//! in `crates/ruff_vendored/vendor/typeshed` change.
|
//! in `crates/red_knot_vendored/vendor/typeshed` change.
|
||||||
|
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue