diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4c58d30794..43e454d164 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -14,11 +14,11 @@ # flake8-pyi /crates/ruff_linter/src/rules/flake8_pyi/ @AlexWaygood -# Script for fuzzing the parser/red-knot etc. +# Script for fuzzing the parser/ty etc. /python/py-fuzzer/ @AlexWaygood -# red-knot -/crates/red_knot* @carljm @MichaReiser @AlexWaygood @sharkdp @dcreager +# ty +/crates/ty* @carljm @MichaReiser @AlexWaygood @sharkdp @dcreager /crates/ruff_db/ @carljm @MichaReiser @AlexWaygood @sharkdp @dcreager -/scripts/knot_benchmark/ @carljm @MichaReiser @AlexWaygood @sharkdp @dcreager -/crates/red_knot_python_semantic @carljm @AlexWaygood @sharkdp @dcreager +/scripts/ty_benchmark/ @carljm @MichaReiser @AlexWaygood @sharkdp @dcreager +/crates/ty_python_semantic @carljm @AlexWaygood @sharkdp @dcreager diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ec094d1d43..b56b243124 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,8 +36,8 @@ jobs: code: ${{ steps.check_code.outputs.changed }} # Flag that is raised when any code that affects the fuzzer is changed fuzz: ${{ steps.check_fuzzer.outputs.changed }} - # Flag that is set to "true" when code related to red-knot changes. - red_knot: ${{ steps.check_red_knot.outputs.changed }} + # Flag that is set to "true" when code related to ty changes. + ty: ${{ steps.check_ty.outputs.changed }} # Flag that is set to "true" when code related to the playground changes. playground: ${{ steps.check_playground.outputs.changed }} @@ -84,7 +84,7 @@ jobs: if git diff --quiet "${MERGE_BASE}...HEAD" -- ':Cargo.toml' \ ':Cargo.lock' \ ':crates/**' \ - ':!crates/red_knot*/**' \ + ':!crates/ty*/**' \ ':!crates/ruff_python_formatter/**' \ ':!crates/ruff_formatter/**' \ ':!crates/ruff_dev/**' \ @@ -145,7 +145,7 @@ jobs: run: | if git diff --quiet "${MERGE_BASE}...HEAD" -- ':**' \ ':!**/*.md' \ - ':crates/red_knot_python_semantic/resources/mdtest/**/*.md' \ + ':crates/ty_python_semantic/resources/mdtest/**/*.md' \ ':!docs/**' \ ':!assets/**' \ ':.github/workflows/ci.yaml' \ @@ -168,15 +168,15 @@ jobs: echo "changed=true" >> "$GITHUB_OUTPUT" fi - - name: Check if the red-knot code changed - id: check_red_knot + - name: Check if the ty code changed + id: check_ty env: MERGE_BASE: ${{ steps.merge_base.outputs.sha }} run: | if git diff --quiet "${MERGE_BASE}...HEAD" -- \ ':Cargo.toml' \ ':Cargo.lock' \ - ':crates/red_knot*/**' \ + ':crates/ty*/**' \ ':crates/ruff_db/**' \ ':crates/ruff_annotate_snippets/**' \ ':crates/ruff_python_ast/**' \ @@ -221,7 +221,7 @@ jobs: - name: "Clippy" run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings - name: "Clippy (wasm)" - run: cargo clippy -p ruff_wasm -p red_knot_wasm --target wasm32-unknown-unknown --all-features --locked -- -D warnings + run: cargo clippy -p ruff_wasm -p ty_wasm --target wasm32-unknown-unknown --all-features --locked -- -D warnings cargo-test-linux: name: "cargo test (linux)" @@ -246,14 +246,14 @@ jobs: uses: taiki-e/install-action@ab3728c7ba6948b9b429627f4d55a68842b27f18 # v2 with: tool: cargo-insta - - name: Red-knot mdtests (GitHub annotations) - if: ${{ needs.determine_changes.outputs.red_knot == 'true' }} + - name: ty mdtests (GitHub annotations) + if: ${{ needs.determine_changes.outputs.ty == 'true' }} env: NO_COLOR: 1 MDTEST_GITHUB_ANNOTATIONS_FORMAT: 1 # Ignore errors if this step fails; we want to continue to later steps in the workflow anyway. # This step is just to get nice GitHub annotations on the PR diff in the files-changed tab. - run: cargo test -p red_knot_python_semantic --test mdtest || true + run: cargo test -p ty_python_semantic --test mdtest || true - name: "Run tests" shell: bash env: @@ -268,7 +268,7 @@ jobs: # sync, not just public items. Eventually we should do this for all # crates; for now add crates here as they are warning-clean to prevent # regression. - - run: cargo doc --no-deps -p red_knot_python_semantic -p red_knot -p red_knot_test -p ruff_db --document-private-items + - run: cargo doc --no-deps -p ty_python_semantic -p ty -p ty_test -p ruff_db --document-private-items env: # Setting RUSTDOCFLAGS because `cargo doc --check` isn't yet implemented (https://github.com/rust-lang/cargo/issues/10025). RUSTDOCFLAGS: "-D warnings" @@ -278,8 +278,8 @@ jobs: path: target/debug/ruff - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: - name: red_knot - path: target/debug/red_knot + name: ty + path: target/debug/ty cargo-test-linux-release: name: "cargo test (linux, release)" @@ -362,9 +362,9 @@ jobs: run: | cd crates/ruff_wasm wasm-pack test --node - - name: "Test red_knot_wasm" + - name: "Test ty_wasm" run: | - cd crates/red_knot_wasm + cd crates/ty_wasm wasm-pack test --node cargo-build-release: @@ -636,29 +636,29 @@ jobs: name: ecosystem-result path: ecosystem-result - fuzz-redknot: - name: "Fuzz for new red-knot panics" + fuzz-ty: + name: "Fuzz for new ty panics" runs-on: depot-ubuntu-22.04-16 needs: - cargo-test-linux - determine_changes # Only runs on pull requests, since that is the only we way we can find the base version for comparison. - if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && github.event_name == 'pull_request' && needs.determine_changes.outputs.red_knot == 'true' }} + if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && github.event_name == 'pull_request' && needs.determine_changes.outputs.ty == 'true' }} timeout-minutes: 20 steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: false - uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 - name: Download new red-knot binary - id: redknot-new + name: Download new ty binary + id: ty-new with: - name: red_knot + name: ty path: target/debug - uses: dawidd6/action-download-artifact@20319c5641d495c8a52e688b7dc5fada6c3a9fbc # v8 - name: Download baseline red-knot binary + name: Download baseline ty binary with: - name: red_knot + name: ty branch: ${{ github.event.pull_request.base.ref }} workflow: "ci.yaml" check_artifacts: true @@ -666,20 +666,20 @@ jobs: - name: Fuzz env: FORCE_COLOR: 1 - NEW_REDKNOT: ${{ steps.redknot-new.outputs.download-path }} + NEW_TY: ${{ steps.ty-new.outputs.download-path }} run: | # Make executable, since artifact download doesn't preserve this - chmod +x "${PWD}/red_knot" "${NEW_REDKNOT}/red_knot" + chmod +x "${PWD}/ty" "${NEW_TY}/ty" ( uvx \ --python="${PYTHON_VERSION}" \ --from=./python/py-fuzzer \ fuzz \ - --test-executable="${NEW_REDKNOT}/red_knot" \ - --baseline-executable="${PWD}/red_knot" \ + --test-executable="${NEW_TY}/ty" \ + --baseline-executable="${PWD}/ty" \ --only-new-bugs \ - --bin=red_knot \ + --bin=ty \ 0-500 ) diff --git a/.github/workflows/daily_property_tests.yaml b/.github/workflows/daily_property_tests.yaml index 6ca8405071..867298d101 100644 --- a/.github/workflows/daily_property_tests.yaml +++ b/.github/workflows/daily_property_tests.yaml @@ -38,17 +38,17 @@ jobs: - name: "Install mold" uses: rui314/setup-mold@e16410e7f8d9e167b74ad5697a9089a35126eb50 # v1 - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8 - - name: Build Red Knot + - name: Build ty # A release build takes longer (2 min vs 1 min), but the property tests run much faster in release # mode (1.5 min vs 14 min), so the overall time is shorter with a release build. - run: cargo build --locked --release --package red_knot_python_semantic --tests + run: cargo build --locked --release --package ty_python_semantic --tests - name: Run property tests shell: bash run: | export QUICKCHECK_TESTS=100000 for _ in {1..5}; do - cargo test --locked --release --package red_knot_python_semantic -- --ignored list::property_tests - cargo test --locked --release --package red_knot_python_semantic -- --ignored types::property_tests::stable + cargo test --locked --release --package ty_python_semantic -- --ignored list::property_tests + cargo test --locked --release --package ty_python_semantic -- --ignored types::property_tests::stable done create-issue-on-failure: @@ -68,5 +68,5 @@ jobs: repo: "ruff", title: `Daily property test run failed on ${new Date().toDateString()}`, body: "Run listed here: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", - labels: ["bug", "red-knot", "testing"], + labels: ["bug", "ty", "testing"], }) diff --git a/.github/workflows/mypy_primer.yaml b/.github/workflows/mypy_primer.yaml index 381de8e386..a88e925734 100644 --- a/.github/workflows/mypy_primer.yaml +++ b/.github/workflows/mypy_primer.yaml @@ -5,7 +5,7 @@ permissions: {} on: pull_request: paths: - - "crates/red_knot*/**" + - "crates/ty*/**" - "crates/ruff_db" - "crates/ruff_python_ast" - "crates/ruff_python_parser" @@ -50,7 +50,7 @@ jobs: run: | cd ruff - PRIMER_SELECTOR="$(paste -s -d'|' crates/red_knot_python_semantic/resources/primer/good.txt)" + PRIMER_SELECTOR="$(paste -s -d'|' crates/ty_python_semantic/resources/primer/good.txt)" echo "new commit" git rev-list --format=%s --max-count=1 "$GITHUB_SHA" @@ -65,10 +65,10 @@ jobs: echo "Project selector: $PRIMER_SELECTOR" # Allow the exit code to be 0 or 1, only fail for actual mypy_primer crashes/bugs uvx \ - --from="git+https://github.com/hauntsaninja/mypy_primer@b83b9eade0b7ed2f4b9b129b163acac1ecb48f71" \ + --from="git+https://github.com/hauntsaninja/mypy_primer@4b15cf3b07db69db67bbfaebfffb2a8a28040933" \ mypy_primer \ --repo ruff \ - --type-checker knot \ + --type-checker ty \ --old base_commit \ --new "$GITHUB_SHA" \ --project-selector "/($PRIMER_SELECTOR)\$" \ diff --git a/.github/workflows/publish-knot-playground.yml b/.github/workflows/publish-ty-playground.yml similarity index 80% rename from .github/workflows/publish-knot-playground.yml rename to .github/workflows/publish-ty-playground.yml index 80b96525c4..b5dc37dc47 100644 --- a/.github/workflows/publish-knot-playground.yml +++ b/.github/workflows/publish-ty-playground.yml @@ -1,5 +1,5 @@ -# Publish the Red Knot playground. -name: "[Knot Playground] Release" +# Publish the ty playground. +name: "[ty Playground] Release" permissions: {} @@ -7,12 +7,12 @@ on: push: branches: [main] paths: - - "crates/red_knot*/**" + - "crates/ty*/**" - "crates/ruff_db/**" - "crates/ruff_python_ast/**" - "crates/ruff_python_parser/**" - "playground/**" - - ".github/workflows/publish-knot-playground.yml" + - ".github/workflows/publish-ty-playground.yml" concurrency: group: ${{ github.workflow }}-${{ github.ref_name }} @@ -45,8 +45,8 @@ jobs: - name: "Run TypeScript checks" run: npm run check working-directory: playground - - name: "Build Knot playground" - run: npm run build --workspace knot-playground + - name: "Build ty playground" + run: npm run build --workspace ty-playground working-directory: playground - name: "Deploy to Cloudflare Pages" if: ${{ env.CF_API_TOKEN_EXISTS == 'true' }} @@ -55,4 +55,4 @@ jobs: apiToken: ${{ secrets.CF_API_TOKEN }} accountId: ${{ secrets.CF_ACCOUNT_ID }} # `github.head_ref` is only set during pull requests and for manual runs or tags we use `main` to deploy to production - command: pages deploy playground/knot/dist --project-name=knot-playground --branch ${{ github.head_ref || 'main' }} --commit-hash ${GITHUB_SHA} + command: pages deploy playground/ty/dist --project-name=ty-playground --branch ${{ github.head_ref || 'main' }} --commit-hash ${GITHUB_SHA} diff --git a/.github/workflows/sync_typeshed.yaml b/.github/workflows/sync_typeshed.yaml index a3128023f8..cbdb4a0df3 100644 --- a/.github/workflows/sync_typeshed.yaml +++ b/.github/workflows/sync_typeshed.yaml @@ -39,13 +39,13 @@ jobs: - name: Sync typeshed id: sync run: | - rm -rf ruff/crates/red_knot_vendored/vendor/typeshed - mkdir ruff/crates/red_knot_vendored/vendor/typeshed - cp typeshed/README.md ruff/crates/red_knot_vendored/vendor/typeshed - cp typeshed/LICENSE ruff/crates/red_knot_vendored/vendor/typeshed - cp -r typeshed/stdlib ruff/crates/red_knot_vendored/vendor/typeshed/stdlib - rm -rf ruff/crates/red_knot_vendored/vendor/typeshed/stdlib/@tests - git -C typeshed rev-parse HEAD > ruff/crates/red_knot_vendored/vendor/typeshed/source_commit.txt + rm -rf ruff/crates/ty_vendored/vendor/typeshed + mkdir ruff/crates/ty_vendored/vendor/typeshed + cp typeshed/README.md ruff/crates/ty_vendored/vendor/typeshed + cp typeshed/LICENSE ruff/crates/ty_vendored/vendor/typeshed + cp -r typeshed/stdlib ruff/crates/ty_vendored/vendor/typeshed/stdlib + rm -rf ruff/crates/ty_vendored/vendor/typeshed/stdlib/@tests + git -C typeshed rev-parse HEAD > ruff/crates/ty_vendored/vendor/typeshed/source_commit.txt - name: Commit the changes id: commit if: ${{ steps.sync.outcome == 'success' }} @@ -79,5 +79,5 @@ jobs: repo: "ruff", title: `Automated typeshed sync failed on ${new Date().toDateString()}`, body: "Run listed here: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", - labels: ["bug", "red-knot"], + labels: ["bug", "ty"], }) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 68f126eeb9..b7e4a79932 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,8 +3,8 @@ fail_fast: false exclude: | (?x)^( .github/workflows/release.yml| - crates/red_knot_vendored/vendor/.*| - crates/red_knot_project/resources/.*| + crates/ty_vendored/vendor/.*| + crates/ty_project/resources/.*| crates/ruff_benchmark/resources/.*| crates/ruff_linter/resources/.*| crates/ruff_linter/src/rules/.*/snapshots/.*| diff --git a/Cargo.lock b/Cargo.lock index c775732fd4..c99ff7b35b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2472,216 +2472,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "red_knot" -version = "0.0.0" -dependencies = [ - "anyhow", - "argfile", - "clap", - "colored 3.0.0", - "countme", - "crossbeam", - "ctrlc", - "filetime", - "insta", - "insta-cmd", - "jiff", - "rayon", - "red_knot_project", - "red_knot_python_semantic", - "red_knot_server", - "regex", - "ruff_db", - "ruff_python_ast", - "ruff_python_trivia", - "salsa", - "tempfile", - "toml", - "tracing", - "tracing-flame", - "tracing-subscriber", - "tracing-tree", - "wild", -] - -[[package]] -name = "red_knot_ide" -version = "0.0.0" -dependencies = [ - "insta", - "red_knot_python_semantic", - "red_knot_vendored", - "ruff_db", - "ruff_python_ast", - "ruff_python_parser", - "ruff_text_size", - "rustc-hash 2.1.1", - "salsa", - "smallvec", - "tracing", -] - -[[package]] -name = "red_knot_project" -version = "0.0.0" -dependencies = [ - "anyhow", - "crossbeam", - "glob", - "insta", - "notify", - "pep440_rs", - "rayon", - "red_knot_ide", - "red_knot_python_semantic", - "red_knot_vendored", - "ruff_cache", - "ruff_db", - "ruff_macros", - "ruff_python_ast", - "ruff_python_formatter", - "ruff_text_size", - "rustc-hash 2.1.1", - "salsa", - "schemars", - "serde", - "thiserror 2.0.12", - "toml", - "tracing", -] - -[[package]] -name = "red_knot_python_semantic" -version = "0.0.0" -dependencies = [ - "anyhow", - "bitflags 2.9.0", - "camino", - "compact_str", - "countme", - "dir-test", - "drop_bomb", - "hashbrown 0.15.2", - "indexmap", - "insta", - "itertools 0.14.0", - "memchr", - "ordermap", - "quickcheck", - "quickcheck_macros", - "red_knot_test", - "red_knot_vendored", - "ruff_db", - "ruff_index", - "ruff_macros", - "ruff_python_ast", - "ruff_python_literal", - "ruff_python_parser", - "ruff_python_stdlib", - "ruff_python_trivia", - "ruff_source_file", - "ruff_text_size", - "rustc-hash 2.1.1", - "salsa", - "schemars", - "serde", - "smallvec", - "static_assertions", - "strum", - "strum_macros", - "tempfile", - "test-case", - "thiserror 2.0.12", - "tracing", -] - -[[package]] -name = "red_knot_server" -version = "0.0.0" -dependencies = [ - "anyhow", - "crossbeam", - "jod-thread", - "libc", - "lsp-server", - "lsp-types", - "red_knot_ide", - "red_knot_project", - "red_knot_python_semantic", - "ruff_db", - "ruff_notebook", - "ruff_source_file", - "ruff_text_size", - "rustc-hash 2.1.1", - "serde", - "serde_json", - "shellexpand", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "red_knot_test" -version = "0.0.0" -dependencies = [ - "anyhow", - "camino", - "colored 3.0.0", - "insta", - "memchr", - "red_knot_python_semantic", - "red_knot_vendored", - "regex", - "ruff_db", - "ruff_index", - "ruff_notebook", - "ruff_python_ast", - "ruff_python_trivia", - "ruff_source_file", - "ruff_text_size", - "rustc-hash 2.1.1", - "salsa", - "serde", - "smallvec", - "tempfile", - "thiserror 2.0.12", - "toml", - "tracing", -] - -[[package]] -name = "red_knot_vendored" -version = "0.0.0" -dependencies = [ - "path-slash", - "ruff_db", - "walkdir", - "zip", -] - -[[package]] -name = "red_knot_wasm" -version = "0.0.0" -dependencies = [ - "console_error_panic_hook", - "console_log", - "getrandom 0.3.2", - "js-sys", - "log", - "red_knot_ide", - "red_knot_project", - "red_knot_python_semantic", - "ruff_db", - "ruff_notebook", - "ruff_python_formatter", - "ruff_source_file", - "ruff_text_size", - "serde-wasm-bindgen", - "wasm-bindgen", - "wasm-bindgen-test", -] - [[package]] name = "redox_syscall" version = "0.5.10" @@ -2838,7 +2628,6 @@ dependencies = [ "criterion", "mimalloc", "rayon", - "red_knot_project", "ruff_db", "ruff_linter", "ruff_python_ast", @@ -2847,6 +2636,7 @@ dependencies = [ "ruff_python_trivia", "rustc-hash 2.1.1", "tikv-jemallocator", + "ty_project", ] [[package]] @@ -2913,7 +2703,6 @@ dependencies = [ "libcst", "pretty_assertions", "rayon", - "red_knot_project", "regex", "ruff", "ruff_diagnostics", @@ -2936,6 +2725,7 @@ dependencies = [ "tracing", "tracing-indicatif", "tracing-subscriber", + "ty_project", ] [[package]] @@ -2971,7 +2761,6 @@ version = "0.1.0" dependencies = [ "anyhow", "clap", - "red_knot_python_semantic", "ruff_cache", "ruff_db", "ruff_linter", @@ -2981,6 +2770,7 @@ dependencies = [ "salsa", "schemars", "serde", + "ty_python_semantic", "zip", ] @@ -4150,6 +3940,216 @@ dependencies = [ "snapbox", ] +[[package]] +name = "ty" +version = "0.0.0" +dependencies = [ + "anyhow", + "argfile", + "clap", + "colored 3.0.0", + "countme", + "crossbeam", + "ctrlc", + "filetime", + "insta", + "insta-cmd", + "jiff", + "rayon", + "regex", + "ruff_db", + "ruff_python_ast", + "ruff_python_trivia", + "salsa", + "tempfile", + "toml", + "tracing", + "tracing-flame", + "tracing-subscriber", + "tracing-tree", + "ty_project", + "ty_python_semantic", + "ty_server", + "wild", +] + +[[package]] +name = "ty_ide" +version = "0.0.0" +dependencies = [ + "insta", + "ruff_db", + "ruff_python_ast", + "ruff_python_parser", + "ruff_text_size", + "rustc-hash 2.1.1", + "salsa", + "smallvec", + "tracing", + "ty_python_semantic", + "ty_vendored", +] + +[[package]] +name = "ty_project" +version = "0.0.0" +dependencies = [ + "anyhow", + "crossbeam", + "glob", + "insta", + "notify", + "pep440_rs", + "rayon", + "ruff_cache", + "ruff_db", + "ruff_macros", + "ruff_python_ast", + "ruff_python_formatter", + "ruff_text_size", + "rustc-hash 2.1.1", + "salsa", + "schemars", + "serde", + "thiserror 2.0.12", + "toml", + "tracing", + "ty_ide", + "ty_python_semantic", + "ty_vendored", +] + +[[package]] +name = "ty_python_semantic" +version = "0.0.0" +dependencies = [ + "anyhow", + "bitflags 2.9.0", + "camino", + "compact_str", + "countme", + "dir-test", + "drop_bomb", + "hashbrown 0.15.2", + "indexmap", + "insta", + "itertools 0.14.0", + "memchr", + "ordermap", + "quickcheck", + "quickcheck_macros", + "ruff_db", + "ruff_index", + "ruff_macros", + "ruff_python_ast", + "ruff_python_literal", + "ruff_python_parser", + "ruff_python_stdlib", + "ruff_python_trivia", + "ruff_source_file", + "ruff_text_size", + "rustc-hash 2.1.1", + "salsa", + "schemars", + "serde", + "smallvec", + "static_assertions", + "strum", + "strum_macros", + "tempfile", + "test-case", + "thiserror 2.0.12", + "tracing", + "ty_test", + "ty_vendored", +] + +[[package]] +name = "ty_server" +version = "0.0.0" +dependencies = [ + "anyhow", + "crossbeam", + "jod-thread", + "libc", + "lsp-server", + "lsp-types", + "ruff_db", + "ruff_notebook", + "ruff_source_file", + "ruff_text_size", + "rustc-hash 2.1.1", + "serde", + "serde_json", + "shellexpand", + "tracing", + "tracing-subscriber", + "ty_ide", + "ty_project", + "ty_python_semantic", +] + +[[package]] +name = "ty_test" +version = "0.0.0" +dependencies = [ + "anyhow", + "camino", + "colored 3.0.0", + "insta", + "memchr", + "regex", + "ruff_db", + "ruff_index", + "ruff_notebook", + "ruff_python_ast", + "ruff_python_trivia", + "ruff_source_file", + "ruff_text_size", + "rustc-hash 2.1.1", + "salsa", + "serde", + "smallvec", + "tempfile", + "thiserror 2.0.12", + "toml", + "tracing", + "ty_python_semantic", + "ty_vendored", +] + +[[package]] +name = "ty_vendored" +version = "0.0.0" +dependencies = [ + "path-slash", + "ruff_db", + "walkdir", + "zip", +] + +[[package]] +name = "ty_wasm" +version = "0.0.0" +dependencies = [ + "console_error_panic_hook", + "console_log", + "getrandom 0.3.2", + "js-sys", + "log", + "ruff_db", + "ruff_notebook", + "ruff_python_formatter", + "ruff_source_file", + "ruff_text_size", + "serde-wasm-bindgen", + "ty_ide", + "ty_project", + "ty_python_semantic", + "wasm-bindgen", + "wasm-bindgen-test", +] + [[package]] name = "typed-arena" version = "2.0.2" diff --git a/Cargo.toml b/Cargo.toml index 039c225ff8..3dd064483e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,14 +35,14 @@ ruff_python_trivia = { path = "crates/ruff_python_trivia" } ruff_server = { path = "crates/ruff_server" } ruff_source_file = { path = "crates/ruff_source_file" } ruff_text_size = { path = "crates/ruff_text_size" } -red_knot_vendored = { path = "crates/red_knot_vendored" } ruff_workspace = { path = "crates/ruff_workspace" } -red_knot_ide = { path = "crates/red_knot_ide" } -red_knot_project = { path = "crates/red_knot_project", default-features = false } -red_knot_python_semantic = { path = "crates/red_knot_python_semantic" } -red_knot_server = { path = "crates/red_knot_server" } -red_knot_test = { path = "crates/red_knot_test" } +ty_ide = { path = "crates/ty_ide" } +ty_project = { path = "crates/ty_project", default-features = false } +ty_python_semantic = { path = "crates/ty_python_semantic" } +ty_server = { path = "crates/ty_server" } +ty_test = { path = "crates/ty_test" } +ty_vendored = { path = "crates/ty_vendored" } aho-corasick = { version = "1.1.3" } anstream = { version = "0.6.18" } diff --git a/_typos.toml b/_typos.toml index 2f38f52eea..402e175533 100644 --- a/_typos.toml +++ b/_typos.toml @@ -1,7 +1,7 @@ [files] # https://github.com/crate-ci/typos/issues/868 extend-exclude = [ - "crates/red_knot_vendored/vendor/**/*", + "crates/ty_vendored/vendor/**/*", "**/resources/**/*", "**/snapshots/**/*", ] diff --git a/crates/red_knot/README.md b/crates/red_knot/README.md deleted file mode 100644 index de53ab22c9..0000000000 --- a/crates/red_knot/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Red Knot - -Red Knot is an extremely fast type checker. -Currently, it is a work-in-progress and not ready for user testing. - -Red Knot is designed to prioritize good type inference, even in unannotated code, -and aims to avoid false positives. - -While Red Knot will produce similar results to mypy and pyright on many codebases, -100% compatibility with these tools is a non-goal. -On some codebases, Red Knot's design decisions lead to different outcomes -than you would get from running one of these more established tools. - -## Contributing - -Core type checking tests are written as Markdown code blocks. -They can be found in [`red_knot_python_semantic/resources/mdtest`][resources-mdtest]. -See [`red_knot_test/README.md`][mdtest-readme] for more information -on the test framework itself. - -The list of open issues can be found [here][open-issues]. - -[mdtest-readme]: ../red_knot_test/README.md -[open-issues]: https://github.com/astral-sh/ruff/issues?q=sort%3Aupdated-desc%20is%3Aissue%20is%3Aopen%20label%3Ared-knot -[resources-mdtest]: ../red_knot_python_semantic/resources/mdtest diff --git a/crates/red_knot_python_semantic/resources/mdtest/suppressions/knot_ignore.md b/crates/red_knot_python_semantic/resources/mdtest/suppressions/knot_ignore.md deleted file mode 100644 index fb8f78bd43..0000000000 --- a/crates/red_knot_python_semantic/resources/mdtest/suppressions/knot_ignore.md +++ /dev/null @@ -1,191 +0,0 @@ -# Suppressing errors with `knot: ignore` - -Type check errors can be suppressed by a `knot: ignore` comment on the same line as the violation. - -## Simple `knot: ignore` - -```py -a = 4 + test # knot: ignore -``` - -## Suppressing a specific code - -```py -a = 4 + test # knot: ignore[unresolved-reference] -``` - -## Unused suppression - -```py -test = 10 -# error: [unused-ignore-comment] "Unused `knot: ignore` directive: 'possibly-unresolved-reference'" -a = test + 3 # knot: ignore[possibly-unresolved-reference] -``` - -## Unused suppression if the error codes don't match - -```py -# error: [unresolved-reference] -# error: [unused-ignore-comment] "Unused `knot: ignore` directive: 'possibly-unresolved-reference'" -a = test + 3 # knot: ignore[possibly-unresolved-reference] -``` - -## Suppressed unused comment - -```py -# error: [unused-ignore-comment] -a = 10 / 2 # knot: ignore[division-by-zero] -a = 10 / 2 # knot: ignore[division-by-zero, unused-ignore-comment] -a = 10 / 2 # knot: ignore[unused-ignore-comment, division-by-zero] -a = 10 / 2 # knot: ignore[unused-ignore-comment] # type: ignore -a = 10 / 2 # type: ignore # knot: ignore[unused-ignore-comment] -``` - -## Unused ignore comment - -```py -# error: [unused-ignore-comment] "Unused `knot: ignore` directive: 'unused-ignore-comment'" -a = 10 / 0 # knot: ignore[division-by-zero, unused-ignore-comment] -``` - -## Multiple unused comments - -Today, Red Knot emits a diagnostic for every unused code. We might want to group the codes by -comment at some point in the future. - -```py -# error: [unused-ignore-comment] "Unused `knot: ignore` directive: 'division-by-zero'" -# error: [unused-ignore-comment] "Unused `knot: ignore` directive: 'unresolved-reference'" -a = 10 / 2 # knot: ignore[division-by-zero, unresolved-reference] - -# error: [unused-ignore-comment] "Unused `knot: ignore` directive: 'invalid-assignment'" -# error: [unused-ignore-comment] "Unused `knot: ignore` directive: 'unresolved-reference'" -a = 10 / 0 # knot: ignore[invalid-assignment, division-by-zero, unresolved-reference] -``` - -## Multiple suppressions - -```py -# fmt: off -def test(a: f"f-string type annotation", b: b"byte-string-type-annotation"): ... # knot: ignore[fstring-type-annotation, byte-string-type-annotation] -``` - -## Can't suppress syntax errors - - - -```py -# error: [invalid-syntax] -# error: [unused-ignore-comment] -def test($): # knot: ignore - pass -``` - - - -## Can't suppress `revealed-type` diagnostics - -```py -a = 10 -# revealed: Literal[10] -# error: [unknown-rule] "Unknown rule `revealed-type`" -reveal_type(a) # knot: ignore[revealed-type] -``` - -## Extra whitespace in type ignore comments is allowed - -```py -a = 10 / 0 # knot : ignore -a = 10 / 0 # knot: ignore [ division-by-zero ] -``` - -## Whitespace is optional - -```py -# fmt: off -a = 10 / 0 #knot:ignore[division-by-zero] -``` - -## Trailing codes comma - -Trailing commas in the codes section are allowed: - -```py -a = 10 / 0 # knot: ignore[division-by-zero,] -``` - -## Invalid characters in codes - -```py -# error: [division-by-zero] -# error: [invalid-ignore-comment] "Invalid `knot: ignore` comment: expected a alphanumeric character or `-` or `_` as code" -a = 10 / 0 # knot: ignore[*-*] -``` - -## Trailing whitespace - - - -```py -a = 10 / 0 # knot: ignore[division-by-zero] - # ^^^^^^ trailing whitespace -``` - - - -## Missing comma - -A missing comma results in an invalid suppression comment. We may want to recover from this in the -future. - -```py -# error: [unresolved-reference] -# error: [invalid-ignore-comment] "Invalid `knot: ignore` comment: expected a comma separating the rule codes" -a = x / 0 # knot: ignore[division-by-zero unresolved-reference] -``` - -## Missing closing bracket - -```py -# error: [unresolved-reference] "Name `x` used when not defined" -# error: [invalid-ignore-comment] "Invalid `knot: ignore` comment: expected a comma separating the rule codes" -a = x / 2 # knot: ignore[unresolved-reference -``` - -## Empty codes - -An empty codes array suppresses no-diagnostics and is always useless - -```py -# error: [division-by-zero] -# error: [unused-ignore-comment] "Unused `knot: ignore` without a code" -a = 4 / 0 # knot: ignore[] -``` - -## File-level suppression comments - -File level suppression comments are currently intentionally unsupported because we've yet to decide -if they should use a different syntax that also supports enabling rules or changing the rule's -severity: `knot: possibly-undefined-reference=error` - -```py -# error: [unused-ignore-comment] -# knot: ignore[division-by-zero] - -a = 4 / 0 # error: [division-by-zero] -``` - -## Unknown rule - -```py -# error: [unknown-rule] "Unknown rule `is-equal-14`" -a = 10 + 4 # knot: ignore[is-equal-14] -``` - -## Code with `lint:` prefix - -```py -# error:[unknown-rule] "Unknown rule `lint:division-by-zero`. Did you mean `division-by-zero`?" -# error: [division-by-zero] -a = 10 / 0 # knot: ignore[lint:division-by-zero] -``` diff --git a/crates/red_knot_vendored/knot_extensions/README.md b/crates/red_knot_vendored/knot_extensions/README.md deleted file mode 100644 index d26f2802b5..0000000000 --- a/crates/red_knot_vendored/knot_extensions/README.md +++ /dev/null @@ -1,3 +0,0 @@ -The `knot_extensions.pyi` file in this directory will be symlinked into -the `vendor/typeshed/stdlib` directory every time we sync our `typeshed` -stubs (see `.github/workflows/sync_typeshed.yaml`). diff --git a/crates/ruff/tests/analyze_graph.rs b/crates/ruff/tests/analyze_graph.rs index 54da7dd705..e59a01c294 100644 --- a/crates/ruff/tests/analyze_graph.rs +++ b/crates/ruff/tests/analyze_graph.rs @@ -552,7 +552,7 @@ fn venv() -> Result<()> { }); // test the error message for a non-existent venv. it's important that the `ruff analyze graph` - // flag matches the red-knot flag used to generate the error message (`--python`) + // flag matches the ty flag used to generate the error message (`--python`) insta::with_settings!({ filters => INSTA_FILTERS.to_vec(), }, { diff --git a/crates/ruff_benchmark/Cargo.toml b/crates/ruff_benchmark/Cargo.toml index cea63ae29f..b5c2a50a13 100644 --- a/crates/ruff_benchmark/Cargo.toml +++ b/crates/ruff_benchmark/Cargo.toml @@ -33,7 +33,7 @@ name = "formatter" harness = false [[bench]] -name = "red_knot" +name = "ty" harness = false [dependencies] @@ -49,7 +49,7 @@ ruff_python_ast = { workspace = true } ruff_python_formatter = { workspace = true } ruff_python_parser = { workspace = true } ruff_python_trivia = { workspace = true } -red_knot_project = { workspace = true } +ty_project = { workspace = true } [lints] workspace = true diff --git a/crates/ruff_benchmark/benches/red_knot.rs b/crates/ruff_benchmark/benches/ty.rs similarity index 94% rename from crates/ruff_benchmark/benches/red_knot.rs rename to crates/ruff_benchmark/benches/ty.rs index e0b0da246b..65731e9a91 100644 --- a/crates/ruff_benchmark/benches/red_knot.rs +++ b/crates/ruff_benchmark/benches/ty.rs @@ -7,16 +7,16 @@ use criterion::{criterion_group, criterion_main, BatchSize, Criterion}; use rayon::ThreadPoolBuilder; use rustc_hash::FxHashSet; -use red_knot_project::metadata::options::{EnvironmentOptions, Options}; -use red_knot_project::metadata::value::RangedValue; -use red_knot_project::watch::{ChangeEvent, ChangedKind}; -use red_knot_project::{Db, ProjectDatabase, ProjectMetadata}; use ruff_benchmark::TestFile; use ruff_db::diagnostic::{Diagnostic, DiagnosticId, Severity}; use ruff_db::files::{system_path_to_file, File}; use ruff_db::source::source_text; use ruff_db::system::{MemoryFileSystem, SystemPath, SystemPathBuf, TestSystem}; use ruff_python_ast::PythonVersion; +use ty_project::metadata::options::{EnvironmentOptions, Options}; +use ty_project::metadata::value::RangedValue; +use ty_project::watch::{ChangeEvent, ChangedKind}; +use ty_project::{Db, ProjectDatabase, ProjectMetadata}; struct Case { db: ProjectDatabase, @@ -122,7 +122,7 @@ static RAYON_INITIALIZED: std::sync::Once = std::sync::Once::new(); fn setup_rayon() { // Initialize the rayon thread pool outside the benchmark because it has a significant cost. // We limit the thread pool to only one (the current thread) because we're focused on - // where red knot spends time and less about how well the code runs concurrently. + // where ty spends time and less about how well the code runs concurrently. // We might want to add a benchmark focusing on concurrency to detect congestion in the future. RAYON_INITIALIZED.call_once(|| { ThreadPoolBuilder::new() @@ -172,7 +172,7 @@ fn benchmark_incremental(criterion: &mut Criterion) { setup_rayon(); - criterion.bench_function("red_knot_check_file[incremental]", |b| { + criterion.bench_function("ty_check_file[incremental]", |b| { b.iter_batched_ref(setup, incremental, BatchSize::SmallInput); }); } @@ -180,7 +180,7 @@ fn benchmark_incremental(criterion: &mut Criterion) { fn benchmark_cold(criterion: &mut Criterion) { setup_rayon(); - criterion.bench_function("red_knot_check_file[cold]", |b| { + criterion.bench_function("ty_check_file[cold]", |b| { b.iter_batched_ref( setup_tomllib_case, |case| { @@ -257,7 +257,7 @@ fn setup_micro_case(code: &str) -> Case { fn benchmark_many_string_assignments(criterion: &mut Criterion) { setup_rayon(); - criterion.bench_function("red_knot_micro[many_string_assignments]", |b| { + criterion.bench_function("ty_micro[many_string_assignments]", |b| { b.iter_batched_ref( || { // This is a micro benchmark, but it is effectively identical to a code sample diff --git a/crates/ruff_db/src/diagnostic/mod.rs b/crates/ruff_db/src/diagnostic/mod.rs index 412eec7530..6807f67888 100644 --- a/crates/ruff_db/src/diagnostic/mod.rs +++ b/crates/ruff_db/src/diagnostic/mod.rs @@ -134,20 +134,20 @@ impl Diagnostic { /// NOTE: At present, this routine will return the first primary /// annotation's message as the primary message when the main diagnostic /// message is empty. This is meant to facilitate an incremental migration - /// in Red Knot over to the new diagnostic data model. (The old data model + /// in ty over to the new diagnostic data model. (The old data model /// didn't distinguish between messages on the entire diagnostic and /// messages attached to a particular span.) pub fn primary_message(&self) -> &str { if !self.inner.message.as_str().is_empty() { return self.inner.message.as_str(); } - // FIXME: As a special case, while we're migrating Red Knot + // FIXME: As a special case, while we're migrating ty // to the new diagnostic data model, we'll look for a primary // message from the primary annotation. This is because most - // Red Knot diagnostics are created with an empty diagnostic + // ty diagnostics are created with an empty diagnostic // message and instead attach the message to the annotation. // Fixing this will require touching basically every diagnostic - // in Red Knot, so we do it this way for now to match the old + // in ty, so we do it this way for now to match the old // semantics. ---AG self.primary_annotation() .and_then(|ann| ann.get_message()) @@ -165,7 +165,7 @@ impl Diagnostic { /// /// The reason why we don't just always return both the main diagnostic /// message and the primary annotation message is because this was written - /// in the midst of an incremental migration of Red Knot over to the new + /// in the midst of an incremental migration of ty over to the new /// diagnostic data model. At time of writing, diagnostics were still /// constructed in the old model where the main diagnostic message and the /// primary annotation message were not distinguished from each other. So diff --git a/crates/ruff_db/src/diagnostic/render.rs b/crates/ruff_db/src/diagnostic/render.rs index e20e8f48aa..084b66d769 100644 --- a/crates/ruff_db/src/diagnostic/render.rs +++ b/crates/ruff_db/src/diagnostic/render.rs @@ -624,7 +624,7 @@ impl<'r> RenderableAnnotation<'r> { /// For example, at time of writing (2025-03-07), the plan is (roughly) for /// Ruff to grow its own interner of file paths so that a `Span` can store an /// interned ID instead of a (roughly) `Arc`. This interner is planned -/// to be entirely separate from the Salsa interner used by Red Knot, and so, +/// to be entirely separate from the Salsa interner used by ty, and so, /// callers will need to pass in a different "resolver" for turning `Span`s /// into actual file paths/contents. The infrastructure for this isn't fully in /// place, but this type serves to demarcate the intended abstraction boundary. diff --git a/crates/ruff_db/src/testing.rs b/crates/ruff_db/src/testing.rs index 9bd683ccad..57f264fa69 100644 --- a/crates/ruff_db/src/testing.rs +++ b/crates/ruff_db/src/testing.rs @@ -107,7 +107,7 @@ fn query_name(_query: &Q) -> &'static str { .unwrap_or(full_qualified_query_name) } -/// Sets up logging for the current thread. It captures all `red_knot` and `ruff` events. +/// Sets up logging for the current thread. It captures all `ty` and `ruff` events. /// /// Useful for capturing the tracing output in a failing test. /// @@ -128,7 +128,7 @@ pub fn setup_logging() -> LoggingGuard { /// # Examples /// ``` /// use ruff_db::testing::setup_logging_with_filter; -/// let _logging = setup_logging_with_filter("red_knot_module_resolver::resolver"); +/// let _logging = setup_logging_with_filter("ty_module_resolver::resolver"); /// ``` /// /// # Filter @@ -148,11 +148,7 @@ impl LoggingBuilder { pub fn new() -> Self { Self { filter: EnvFilter::default() - .add_directive( - "red_knot=trace" - .parse() - .expect("Hardcoded directive to be valid"), - ) + .add_directive("ty=trace".parse().expect("Hardcoded directive to be valid")) .add_directive( "ruff=trace" .parse() diff --git a/crates/ruff_dev/Cargo.toml b/crates/ruff_dev/Cargo.toml index 9432476a5a..c007005860 100644 --- a/crates/ruff_dev/Cargo.toml +++ b/crates/ruff_dev/Cargo.toml @@ -11,7 +11,7 @@ repository = { workspace = true } license = { workspace = true } [dependencies] -red_knot_project = { workspace = true, features = ["schemars"] } +ty_project = { workspace = true, features = ["schemars"] } ruff = { workspace = true } ruff_diagnostics = { workspace = true } ruff_formatter = { workspace = true } diff --git a/crates/ruff_dev/src/generate_all.rs b/crates/ruff_dev/src/generate_all.rs index f22c562ae6..d4fd30a869 100644 --- a/crates/ruff_dev/src/generate_all.rs +++ b/crates/ruff_dev/src/generate_all.rs @@ -2,7 +2,7 @@ use anyhow::Result; -use crate::{generate_cli_help, generate_docs, generate_json_schema, generate_knot_schema}; +use crate::{generate_cli_help, generate_docs, generate_json_schema, generate_ty_schema}; pub(crate) const REGENERATE_ALL_COMMAND: &str = "cargo dev generate-all"; @@ -33,7 +33,7 @@ impl Mode { pub(crate) fn main(args: &Args) -> Result<()> { generate_json_schema::main(&generate_json_schema::Args { mode: args.mode })?; - generate_knot_schema::main(&generate_knot_schema::Args { mode: args.mode })?; + generate_ty_schema::main(&generate_ty_schema::Args { mode: args.mode })?; generate_cli_help::main(&generate_cli_help::Args { mode: args.mode })?; generate_docs::main(&generate_docs::Args { dry_run: args.mode.is_dry_run(), diff --git a/crates/ruff_dev/src/generate_knot_schema.rs b/crates/ruff_dev/src/generate_ty_schema.rs similarity index 87% rename from crates/ruff_dev/src/generate_knot_schema.rs rename to crates/ruff_dev/src/generate_ty_schema.rs index 0c6f832098..77d8e076ec 100644 --- a/crates/ruff_dev/src/generate_knot_schema.rs +++ b/crates/ruff_dev/src/generate_ty_schema.rs @@ -9,11 +9,11 @@ use schemars::schema_for; use crate::generate_all::{Mode, REGENERATE_ALL_COMMAND}; use crate::ROOT_DIR; -use red_knot_project::metadata::options::Options; +use ty_project::metadata::options::Options; #[derive(clap::Args)] pub(crate) struct Args { - /// Write the generated table to stdout (rather than to `knot.schema.json`). + /// Write the generated table to stdout (rather than to `ty.schema.json`). #[arg(long, default_value_t, value_enum)] pub(crate) mode: Mode, } @@ -21,7 +21,7 @@ pub(crate) struct Args { pub(crate) fn main(args: &Args) -> Result<()> { let schema = schema_for!(Options); let schema_string = serde_json::to_string_pretty(&schema).unwrap(); - let filename = "knot.schema.json"; + let filename = "ty.schema.json"; let schema_path = PathBuf::from(ROOT_DIR).join(filename); match args.mode { @@ -62,7 +62,7 @@ mod tests { #[test] fn test_generate_json_schema() -> Result<()> { - let mode = if env::var("KNOT_UPDATE_SCHEMA").as_deref() == Ok("1") { + let mode = if env::var("TY_UPDATE_SCHEMA").as_deref() == Ok("1") { Mode::Write } else { Mode::Check diff --git a/crates/ruff_dev/src/main.rs b/crates/ruff_dev/src/main.rs index 5fb10476da..c2dd13d0f8 100644 --- a/crates/ruff_dev/src/main.rs +++ b/crates/ruff_dev/src/main.rs @@ -13,9 +13,9 @@ mod generate_all; mod generate_cli_help; mod generate_docs; mod generate_json_schema; -mod generate_knot_schema; mod generate_options; mod generate_rules_table; +mod generate_ty_schema; mod print_ast; mod print_cst; mod print_tokens; @@ -40,8 +40,8 @@ enum Command { GenerateAll(generate_all::Args), /// Generate JSON schema for the TOML configuration file. GenerateJSONSchema(generate_json_schema::Args), - /// Generate JSON schema for the Red Knot TOML configuration file. - GenerateKnotSchema(generate_knot_schema::Args), + /// Generate JSON schema for the ty TOML configuration file. + GenerateTySchema(generate_ty_schema::Args), /// Generate a Markdown-compatible table of supported lint rules. GenerateRulesTable, /// Generate a Markdown-compatible listing of configuration options. @@ -86,7 +86,7 @@ fn main() -> Result { match command { Command::GenerateAll(args) => generate_all::main(&args)?, Command::GenerateJSONSchema(args) => generate_json_schema::main(&args)?, - Command::GenerateKnotSchema(args) => generate_knot_schema::main(&args)?, + Command::GenerateTySchema(args) => generate_ty_schema::main(&args)?, Command::GenerateRulesTable => println!("{}", generate_rules_table::generate()), Command::GenerateOptions => println!("{}", generate_options::generate()), Command::GenerateCliHelp(args) => generate_cli_help::main(&args)?, diff --git a/crates/ruff_graph/Cargo.toml b/crates/ruff_graph/Cargo.toml index 645c9cd2e4..917a2f4e05 100644 --- a/crates/ruff_graph/Cargo.toml +++ b/crates/ruff_graph/Cargo.toml @@ -10,13 +10,13 @@ authors.workspace = true license.workspace = true [dependencies] -red_knot_python_semantic = { workspace = true } ruff_cache = { workspace = true } ruff_db = { workspace = true, features = ["os", "serde"] } ruff_linter = { workspace = true } ruff_macros = { workspace = true } ruff_python_ast = { workspace = true } ruff_python_parser = { workspace = true } +ty_python_semantic = { workspace = true } anyhow = { workspace = true } clap = { workspace = true, optional = true } diff --git a/crates/ruff_graph/src/collector.rs b/crates/ruff_graph/src/collector.rs index 7946b2c5a6..770241e8de 100644 --- a/crates/ruff_graph/src/collector.rs +++ b/crates/ruff_graph/src/collector.rs @@ -1,8 +1,8 @@ -use red_knot_python_semantic::ModuleName; use ruff_python_ast::visitor::source_order::{ walk_expr, walk_module, walk_stmt, SourceOrderVisitor, }; use ruff_python_ast::{self as ast, Expr, Mod, Stmt}; +use ty_python_semantic::ModuleName; /// Collect all imports for a given Python file. #[derive(Default, Debug)] diff --git a/crates/ruff_graph/src/db.rs b/crates/ruff_graph/src/db.rs index e339262bff..d3866dec0d 100644 --- a/crates/ruff_graph/src/db.rs +++ b/crates/ruff_graph/src/db.rs @@ -2,16 +2,16 @@ use anyhow::Result; use std::sync::Arc; use zip::CompressionMethod; -use red_knot_python_semantic::lint::{LintRegistry, RuleSelection}; -use red_knot_python_semantic::{ - default_lint_registry, Db, Program, ProgramSettings, PythonPath, PythonPlatform, - SearchPathSettings, -}; use ruff_db::files::{File, Files}; use ruff_db::system::{OsSystem, System, SystemPathBuf}; use ruff_db::vendored::{VendoredFileSystem, VendoredFileSystemBuilder}; use ruff_db::{Db as SourceDb, Upcast}; use ruff_python_ast::PythonVersion; +use ty_python_semantic::lint::{LintRegistry, RuleSelection}; +use ty_python_semantic::{ + default_lint_registry, Db, Program, ProgramSettings, PythonPath, PythonPlatform, + SearchPathSettings, +}; static EMPTY_VENDORED: std::sync::LazyLock = std::sync::LazyLock::new(|| { let mut builder = VendoredFileSystemBuilder::new(CompressionMethod::Stored); diff --git a/crates/ruff_graph/src/resolver.rs b/crates/ruff_graph/src/resolver.rs index f5eb044020..b1b488fb67 100644 --- a/crates/ruff_graph/src/resolver.rs +++ b/crates/ruff_graph/src/resolver.rs @@ -1,5 +1,5 @@ -use red_knot_python_semantic::resolve_module; use ruff_db::files::FilePath; +use ty_python_semantic::resolve_module; use crate::collector::CollectedImport; use crate::ModuleDb; diff --git a/crates/ruff_linter/resources/test/fixtures/flake8_bandit/S704.py b/crates/ruff_linter/resources/test/fixtures/flake8_bandit/S704.py index 7748a0ac40..41cc8bc44b 100644 --- a/crates/ruff_linter/resources/test/fixtures/flake8_bandit/S704.py +++ b/crates/ruff_linter/resources/test/fixtures/flake8_bandit/S704.py @@ -12,7 +12,7 @@ flask.Markup("unsafe %s" % content) # S704 Markup(object="safe") Markup(object="unsafe {}".format(content)) # Not currently detected -# NOTE: We may be able to get rid of these false positives with red-knot +# NOTE: We may be able to get rid of these false positives with ty # if it includes comprehensive constant expression detection/evaluation. Markup("*" * 8) # S704 (false positive) flask.Markup("hello {}".format("world")) # S704 (false positive) diff --git a/crates/ruff_linter/src/logging.rs b/crates/ruff_linter/src/logging.rs index 554c4e2c84..5cf75d509b 100644 --- a/crates/ruff_linter/src/logging.rs +++ b/crates/ruff_linter/src/logging.rs @@ -151,7 +151,7 @@ pub fn set_up_logging(level: LogLevel) -> Result<()> { }) .level(level.level_filter()) .level_for("globset", log::LevelFilter::Warn) - .level_for("red_knot_python_semantic", log::LevelFilter::Warn) + .level_for("ty_python_semantic", log::LevelFilter::Warn) .level_for("salsa", log::LevelFilter::Warn) .chain(std::io::stderr()) .apply()?; diff --git a/crates/ruff_linter/src/rules/flake8_bandit/snapshots/ruff_linter__rules__flake8_bandit__tests__S704_S704.py.snap b/crates/ruff_linter/src/rules/flake8_bandit/snapshots/ruff_linter__rules__flake8_bandit__tests__S704_S704.py.snap index 8ee7eb09b6..02a25f90f6 100644 --- a/crates/ruff_linter/src/rules/flake8_bandit/snapshots/ruff_linter__rules__flake8_bandit__tests__S704_S704.py.snap +++ b/crates/ruff_linter/src/rules/flake8_bandit/snapshots/ruff_linter__rules__flake8_bandit__tests__S704_S704.py.snap @@ -42,7 +42,7 @@ S704.py:11:1: S704 Unsafe use of `flask.Markup` detected S704.py:17:1: S704 Unsafe use of `markupsafe.Markup` detected | -15 | # NOTE: We may be able to get rid of these false positives with red-knot +15 | # NOTE: We may be able to get rid of these false positives with ty 16 | # if it includes comprehensive constant expression detection/evaluation. 17 | Markup("*" * 8) # S704 (false positive) | ^^^^^^^^^^^^^^^ S704 diff --git a/crates/ruff_macros/src/lib.rs b/crates/ruff_macros/src/lib.rs index 05913ddee8..99bac807fe 100644 --- a/crates/ruff_macros/src/lib.rs +++ b/crates/ruff_macros/src/lib.rs @@ -36,8 +36,8 @@ pub fn derive_combine_options(input: TokenStream) -> TokenStream { .into() } -/// Automatically derives a `red_knot_project::project::Combine` implementation for the attributed type -/// that calls `red_knot_project::project::Combine::combine` for each field. +/// Automatically derives a `ty_project::project::Combine` implementation for the attributed type +/// that calls `ty_project::project::Combine::combine` for each field. /// /// The derive macro can only be used on structs. Enums aren't yet supported. #[proc_macro_derive(Combine)] diff --git a/crates/red_knot/Cargo.toml b/crates/ty/Cargo.toml similarity index 89% rename from crates/red_knot/Cargo.toml rename to crates/ty/Cargo.toml index 474a08f5b3..9ce23eb648 100644 --- a/crates/red_knot/Cargo.toml +++ b/crates/ty/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "red_knot" +name = "ty" version = "0.0.0" edition.workspace = true rust-version.workspace = true @@ -12,11 +12,11 @@ license.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -red_knot_python_semantic = { workspace = true } -red_knot_project = { workspace = true, features = ["zstd"] } -red_knot_server = { workspace = true } ruff_db = { workspace = true, features = ["os", "cache"] } ruff_python_ast = { workspace = true } +ty_python_semantic = { workspace = true } +ty_project = { workspace = true, features = ["zstd"] } +ty_server = { workspace = true } anyhow = { workspace = true } argfile = { workspace = true } diff --git a/crates/ty/README.md b/crates/ty/README.md new file mode 100644 index 0000000000..e0b644c3ea --- /dev/null +++ b/crates/ty/README.md @@ -0,0 +1,25 @@ +# ty + +ty is an extremely fast type checker. +Currently, it is a work-in-progress and not ready for user testing. + +ty is designed to prioritize good type inference, even in unannotated code, +and aims to avoid false positives. + +While ty will produce similar results to mypy and pyright on many codebases, +100% compatibility with these tools is a non-goal. +On some codebases, ty's design decisions lead to different outcomes +than you would get from running one of these more established tools. + +## Contributing + +Core type checking tests are written as Markdown code blocks. +They can be found in [`ty_python_semantic/resources/mdtest`][resources-mdtest]. +See [`ty_test/README.md`][mdtest-readme] for more information +on the test framework itself. + +The list of open issues can be found [here][open-issues]. + +[mdtest-readme]: ../ty_test/README.md +[open-issues]: https://github.com/astral-sh/ty/issues +[resources-mdtest]: ../ty_python_semantic/resources/mdtest diff --git a/crates/red_knot/build.rs b/crates/ty/build.rs similarity index 94% rename from crates/red_knot/build.rs rename to crates/ty/build.rs index 3cd5edd646..bcfcf6331d 100644 --- a/crates/red_knot/build.rs +++ b/crates/ty/build.rs @@ -59,8 +59,8 @@ fn commit_info(workspace_root: &Path) { let mut parts = stdout.split_whitespace(); let mut next = || parts.next().unwrap(); let _commit_hash = next(); - println!("cargo::rustc-env=RED_KNOT_COMMIT_SHORT_HASH={}", next()); - println!("cargo::rustc-env=RED_KNOT_COMMIT_DATE={}", next()); + println!("cargo::rustc-env=TY_COMMIT_SHORT_HASH={}", next()); + println!("cargo::rustc-env=TY_COMMIT_DATE={}", next()); // Describe can fail for some commits // https://git-scm.com/docs/pretty-formats#Documentation/pretty-formats.txt-emdescribeoptionsem @@ -70,7 +70,7 @@ fn commit_info(workspace_root: &Path) { // If this is the tagged commit, this component will be missing println!( - "cargo::rustc-env=RED_KNOT_LAST_TAG_DISTANCE={}", + "cargo::rustc-env=TY_LAST_TAG_DISTANCE={}", describe_parts.next().unwrap_or("0") ); } diff --git a/crates/red_knot/docs/mypy_primer.md b/crates/ty/docs/mypy_primer.md similarity index 89% rename from crates/red_knot/docs/mypy_primer.md rename to crates/ty/docs/mypy_primer.md index bcf288265e..95345c6282 100644 --- a/crates/red_knot/docs/mypy_primer.md +++ b/crates/ty/docs/mypy_primer.md @@ -22,7 +22,7 @@ To show the diagnostics diff between two Git revisions (e.g. your feature branch ```sh mypy_primer \ - --type-checker knot \ + --type-checker ty \ --old origin/main \ --new my/feature \ --debug \ @@ -31,15 +31,15 @@ mypy_primer \ ``` This will show the diagnostics diff for the `black` project between the `main` branch and your `my/feature` branch. To run the -diff for all projects we currently enable in CI, use `--project-selector "/($(paste -s -d'|' crates/red_knot_python_semantic/resources/primer/good.txt))\$"`. +diff for all projects we currently enable in CI, use `--project-selector "/($(paste -s -d'|' crates/ty_python_semantic/resources/primer/good.txt))\$"`. -You can also take a look at the [full list of ecosystem projects]. Note that some of them might still need a `knot_paths` configuration +You can also take a look at the [full list of ecosystem projects]. Note that some of them might still need a `ty_paths` configuration option to work correctly. ## Avoiding recompilation If you want to run `mypy_primer` repeatedly, e.g. for different projects, but for the same combination of `--old` and `--new`, you -can use set the `MYPY_PRIMER_NO_REBUILD` environment variable to avoid recompilation of Red Knot: +can use set the `MYPY_PRIMER_NO_REBUILD` environment variable to avoid recompilation of ty: ```sh MYPY_PRIMER_NO_REBUILD=1 mypy_primer … diff --git a/crates/red_knot/docs/tracing-flamegraph.png b/crates/ty/docs/tracing-flamegraph.png similarity index 100% rename from crates/red_knot/docs/tracing-flamegraph.png rename to crates/ty/docs/tracing-flamegraph.png diff --git a/crates/red_knot/docs/tracing.md b/crates/ty/docs/tracing.md similarity index 78% rename from crates/red_knot/docs/tracing.md rename to crates/ty/docs/tracing.md index 360d3bc87f..7bbf7f5806 100644 --- a/crates/red_knot/docs/tracing.md +++ b/crates/ty/docs/tracing.md @@ -11,16 +11,16 @@ The CLI supports different verbosity levels. - default: Only show errors and warnings. - `-v` activates `info!`: Show generally useful information such as paths of configuration files, detected platform, etc., but it's not a lot of messages, it's something you'll activate in CI by default. cargo build e.g. shows you which packages are fresh. - `-vv` activates `debug!` and timestamps: This should be enough information to get to the bottom of bug reports. When you're processing many packages or files, you'll get pages and pages of output, but each line is link to a specific action or state change. -- `-vvv` activates `trace!` (only in debug builds) and shows tracing-spans: At this level, you're logging everything. Most of this is wasted, it's really slow, we dump e.g. the entire resolution graph. Only useful to developers, and you almost certainly want to use `RED_KNOT_LOG` to filter it down to the area your investigating. +- `-vvv` activates `trace!` (only in debug builds) and shows tracing-spans: At this level, you're logging everything. Most of this is wasted, it's really slow, we dump e.g. the entire resolution graph. Only useful to developers, and you almost certainly want to use `TY_LOG` to filter it down to the area your investigating. -## Better logging with `RED_KNOT_LOG` and `RAYON_NUM_THREADS` +## Better logging with `TY_LOG` and `RAYON_NUM_THREADS` -By default, the CLI shows messages from the `ruff` and `red_knot` crates. Tracing messages from other crates are not shown. -The `RED_KNOT_LOG` environment variable allows you to customize which messages are shown by specifying one +By default, the CLI shows messages from the `ruff` and `ty` crates. Tracing messages from other crates are not shown. +The `TY_LOG` environment variable allows you to customize which messages are shown by specifying one or more [filter directives](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives). -The `RAYON_NUM_THREADS` environment variable, meanwhile, can be used to control the level of concurrency red-knot uses. -By default, red-knot will attempt to parallelize its work so that multiple files are checked simultaneously, +The `RAYON_NUM_THREADS` environment variable, meanwhile, can be used to control the level of concurrency ty uses. +By default, ty will attempt to parallelize its work so that multiple files are checked simultaneously, but this can result in a confused logging output where messages from different threads are intertwined. To switch off concurrency entirely and have more readable logs, use `RAYON_NUM_THREADS=1`. @@ -31,23 +31,23 @@ To switch off concurrency entirely and have more readable logs, use `RAYON_NUM_T Shows debug messages from all crates. ```bash -RED_KNOT_LOG=debug +TY_LOG=debug ``` #### Show salsa query execution messages -Show the salsa `execute: my_query` messages in addition to all red knot messages. +Show the salsa `execute: my_query` messages in addition to all ty messages. ```bash -RED_KNOT_LOG=ruff=trace,red_knot=trace,salsa=info +TY_LOG=ruff=trace,ty=trace,salsa=info ``` #### Show typing traces -Only show traces for the `red_knot_python_semantic::types` module. +Only show traces for the `ty_python_semantic::types` module. ```bash -RED_KNOT_LOG="red_knot_python_semantic::types" +TY_LOG="ty_python_semantic::types" ``` Note: Ensure that you use `-vvv` to see tracing spans. @@ -57,7 +57,7 @@ Note: Ensure that you use `-vvv` to see tracing spans. Shows all messages that are inside of a span for a specific file. ```bash -RED_KNOT_LOG=red_knot[{file=/home/micha/astral/test/x.py}]=trace +TY_LOG=ty[{file=/home/micha/astral/test/x.py}]=trace ``` **Note**: Tracing still shows all spans because tracing can't know at the time of entering the span @@ -103,10 +103,10 @@ called **once**. ## Profiling -Red Knot generates a folded stack trace to the current directory named `tracing.folded` when setting the environment variable `RED_KNOT_LOG_PROFILE` to `1` or `true`. +ty generates a folded stack trace to the current directory named `tracing.folded` when setting the environment variable `TY_LOG_PROFILE` to `1` or `true`. ```bash -RED_KNOT_LOG_PROFILE=1 red_knot -- --current-directory=../test -vvv +TY_LOG_PROFILE=1 ty -- --current-directory=../test -vvv ``` You can convert the textual representation into a visual one using `inferno`. diff --git a/crates/red_knot/src/args.rs b/crates/ty/src/args.rs similarity index 94% rename from crates/red_knot/src/args.rs rename to crates/ty/src/args.rs index 00b40dd5ff..5049bd1551 100644 --- a/crates/red_knot/src/args.rs +++ b/crates/ty/src/args.rs @@ -1,17 +1,13 @@ use crate::logging::Verbosity; use crate::python_version::PythonVersion; use clap::{ArgAction, ArgMatches, Error, Parser}; -use red_knot_project::metadata::options::{EnvironmentOptions, Options, TerminalOptions}; -use red_knot_project::metadata::value::{RangedValue, RelativePathBuf}; -use red_knot_python_semantic::lint; use ruff_db::system::SystemPathBuf; +use ty_project::metadata::options::{EnvironmentOptions, Options, TerminalOptions}; +use ty_project::metadata::value::{RangedValue, RelativePathBuf}; +use ty_python_semantic::lint; #[derive(Debug, Parser)] -#[command( - author, - name = "red-knot", - about = "An extremely fast Python type checker." -)] +#[command(author, name = "ty", about = "An extremely fast Python type checker.")] #[command(version)] pub(crate) struct Args { #[command(subcommand)] @@ -26,7 +22,7 @@ pub(crate) enum Command { /// Start the language server Server, - /// Display Red Knot's version + /// Display ty's version Version, } @@ -48,11 +44,11 @@ pub(crate) struct CheckCommand { #[arg(long, value_name = "PROJECT")] pub(crate) project: Option, - /// Path to the Python installation from which Red Knot resolves type information and third-party dependencies. + /// Path to the Python installation from which ty resolves type information and third-party dependencies. /// - /// If not specified, Red Knot will look at the `VIRTUAL_ENV` environment variable. + /// If not specified, ty will look at the `VIRTUAL_ENV` environment variable. /// - /// Red Knot will search in the path's `site-packages` directories for type information and + /// ty will search in the path's `site-packages` directories for type information and /// third-party imports. /// /// This option is commonly used to specify the path to a virtual environment. diff --git a/crates/red_knot/src/logging.rs b/crates/ty/src/logging.rs similarity index 89% rename from crates/red_knot/src/logging.rs rename to crates/ty/src/logging.rs index c55878c60c..010dfda494 100644 --- a/crates/red_knot/src/logging.rs +++ b/crates/ty/src/logging.rs @@ -1,4 +1,4 @@ -//! Sets up logging for Red Knot +//! Sets up logging for ty use anyhow::Context; use colored::Colorize; @@ -42,14 +42,14 @@ impl Verbosity { #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)] pub(crate) enum VerbosityLevel { - /// Default output level. Only shows Ruff and Red Knot events up to the [`WARN`](tracing::Level::WARN). + /// Default output level. Only shows Ruff and ty events up to the [`WARN`](tracing::Level::WARN). Default, - /// Enables verbose output. Emits Ruff and Red Knot events up to the [`INFO`](tracing::Level::INFO). + /// Enables verbose output. Emits Ruff and ty events up to the [`INFO`](tracing::Level::INFO). /// Corresponds to `-v`. Verbose, - /// Enables a more verbose tracing format and emits Ruff and Red Knot events up to [`DEBUG`](tracing::Level::DEBUG). + /// Enables a more verbose tracing format and emits Ruff and ty events up to [`DEBUG`](tracing::Level::DEBUG). /// Corresponds to `-vv` ExtraVerbose, @@ -79,11 +79,11 @@ impl VerbosityLevel { pub(crate) fn setup_tracing(level: VerbosityLevel) -> anyhow::Result { use tracing_subscriber::prelude::*; - // The `RED_KNOT_LOG` environment variable overrides the default log level. - let filter = if let Ok(log_env_variable) = std::env::var("RED_KNOT_LOG") { + // The `TY_LOG` environment variable overrides the default log level. + let filter = if let Ok(log_env_variable) = std::env::var("TY_LOG") { EnvFilter::builder() .parse(log_env_variable) - .context("Failed to parse directives specified in RED_KNOT_LOG environment variable.")? + .context("Failed to parse directives specified in TY_LOG environment variable.")? } else { match level { VerbosityLevel::Default => { @@ -93,9 +93,9 @@ pub(crate) fn setup_tracing(level: VerbosityLevel) -> anyhow::Result { let level_filter = level.level_filter(); - // Show info|debug|trace events, but allow `RED_KNOT_LOG` to override + // Show info|debug|trace events, but allow `TY_LOG` to override let filter = EnvFilter::default().add_directive( - format!("red_knot={level_filter}") + format!("ty={level_filter}") .parse() .expect("Hardcoded directive to be valid"), ); @@ -131,7 +131,7 @@ pub(crate) fn setup_tracing(level: VerbosityLevel) -> anyhow::Result() -> ( where S: Subscriber + for<'span> LookupSpan<'span>, { - if let Ok("1" | "true") = std::env::var("RED_KNOT_LOG_PROFILE").as_deref() { + if let Ok("1" | "true") = std::env::var("TY_LOG_PROFILE").as_deref() { let (layer, guard) = tracing_flame::FlameLayer::with_file("tracing.folded") .expect("Flame layer to be created"); (Some(layer), Some(guard)) @@ -168,14 +168,14 @@ pub(crate) struct TracingGuard { _flame_guard: Option>>, } -struct RedKnotFormat { +struct TyFormat { display_timestamp: bool, display_level: bool, show_spans: bool, } /// See -impl FormatEvent for RedKnotFormat +impl FormatEvent for TyFormat where S: Subscriber + for<'a> LookupSpan<'a>, N: for<'a> FormatFields<'a> + 'static, diff --git a/crates/red_knot/src/main.rs b/crates/ty/src/main.rs similarity index 96% rename from crates/red_knot/src/main.rs rename to crates/ty/src/main.rs index 4ed4065c0c..18a4deebae 100644 --- a/crates/red_knot/src/main.rs +++ b/crates/ty/src/main.rs @@ -10,14 +10,14 @@ use anyhow::{anyhow, Context}; use clap::Parser; use colored::Colorize; use crossbeam::channel as crossbeam_channel; -use red_knot_project::metadata::options::Options; -use red_knot_project::watch::ProjectWatcher; -use red_knot_project::{watch, Db}; -use red_knot_project::{ProjectDatabase, ProjectMetadata}; -use red_knot_server::run_server; use ruff_db::diagnostic::{Diagnostic, DisplayDiagnosticConfig, Severity}; use ruff_db::system::{OsSystem, SystemPath, SystemPathBuf}; use salsa::plumbing::ZalsaDatabase; +use ty_project::metadata::options::Options; +use ty_project::watch::ProjectWatcher; +use ty_project::{watch, Db}; +use ty_project::{ProjectDatabase, ProjectMetadata}; +use ty_server::run_server; mod args; mod logging; @@ -32,9 +32,9 @@ pub fn main() -> ExitStatus { // Use `writeln` instead of `eprintln` to avoid panicking when the stderr pipe is broken. let mut stderr = std::io::stderr().lock(); - // This communicates that this isn't a linter error but Red Knot itself hard-errored for + // This communicates that this isn't a linter error but ty itself hard-errored for // some reason (e.g. failed to resolve the configuration) - writeln!(stderr, "{}", "Red Knot failed".red().bold()).ok(); + writeln!(stderr, "{}", "ty failed".red().bold()).ok(); // Currently we generally only see one error, but e.g. with io errors when resolving // the configuration it is help to chain errors ("resolving configuration failed" -> // "failed to read file: subdir/pyproject.toml") @@ -71,7 +71,7 @@ fn run() -> anyhow::Result { pub(crate) fn version() -> Result<()> { let mut stdout = BufWriter::new(io::stdout().lock()); let version_info = crate::version::version(); - writeln!(stdout, "red knot {}", &version_info)?; + writeln!(stdout, "ty {}", &version_info)?; Ok(()) } @@ -90,7 +90,7 @@ fn run_check(args: CheckCommand) -> anyhow::Result { SystemPathBuf::from_path_buf(cwd) .map_err(|path| { anyhow!( - "The current working directory `{}` contains non-Unicode characters. Red Knot only supports Unicode paths.", + "The current working directory `{}` contains non-Unicode characters. ty only supports Unicode paths.", path.display() ) })? @@ -172,7 +172,7 @@ pub enum ExitStatus { /// Checking failed due to an invocation error (e.g. the current directory no longer exists, incorrect CLI arguments, ...) Error = 2, - /// Internal Red Knot error (panic, or any other error that isn't due to the user using the + /// Internal ty error (panic, or any other error that isn't due to the user using the /// program incorrectly or transient environment errors). InternalError = 101, } diff --git a/crates/red_knot/src/python_version.rs b/crates/ty/src/python_version.rs similarity index 100% rename from crates/red_knot/src/python_version.rs rename to crates/ty/src/python_version.rs diff --git a/crates/red_knot/src/version.rs b/crates/ty/src/version.rs similarity index 79% rename from crates/red_knot/src/version.rs rename to crates/ty/src/version.rs index 35ccf05f65..871fb78af2 100644 --- a/crates/red_knot/src/version.rs +++ b/crates/ty/src/version.rs @@ -1,16 +1,16 @@ -//! Code for representing Red Knot's release version number. +//! Code for representing ty's release version number. use std::fmt; -/// Information about the git repository where Red Knot was built from. +/// Information about the git repository where ty was built from. pub(crate) struct CommitInfo { short_commit_hash: String, commit_date: String, commits_since_last_tag: u32, } -/// Red Knot's version. +/// ty's version. pub(crate) struct VersionInfo { - /// Red Knot's version, such as "0.5.1" + /// ty's version, such as "0.5.1" version: String, /// Information about the git commit we may have been built from. /// @@ -34,7 +34,7 @@ impl fmt::Display for VersionInfo { } } -/// Returns information about Red Knot's version. +/// Returns information about ty's version. pub(crate) fn version() -> VersionInfo { // Environment variables are only read at compile-time macro_rules! option_env_str { @@ -47,14 +47,13 @@ pub(crate) fn version() -> VersionInfo { let version = option_env_str!("CARGO_PKG_VERSION").unwrap(); // Commit info is pulled from git and set by `build.rs` - let commit_info = - option_env_str!("RED_KNOT_COMMIT_SHORT_HASH").map(|short_commit_hash| CommitInfo { - short_commit_hash, - commit_date: option_env_str!("RED_KNOT_COMMIT_DATE").unwrap(), - commits_since_last_tag: option_env_str!("RED_KNOT_LAST_TAG_DISTANCE") - .as_deref() - .map_or(0, |value| value.parse::().unwrap_or(0)), - }); + let commit_info = option_env_str!("TY_COMMIT_SHORT_HASH").map(|short_commit_hash| CommitInfo { + short_commit_hash, + commit_date: option_env_str!("TY_COMMIT_DATE").unwrap(), + commits_since_last_tag: option_env_str!("TY_LAST_TAG_DISTANCE") + .as_deref() + .map_or(0, |value| value.parse::().unwrap_or(0)), + }); VersionInfo { version, diff --git a/crates/red_knot/tests/cli.rs b/crates/ty/tests/cli.rs similarity index 97% rename from crates/red_knot/tests/cli.rs rename to crates/ty/tests/cli.rs index 4364b8f497..fd46ca323c 100644 --- a/crates/red_knot/tests/cli.rs +++ b/crates/ty/tests/cli.rs @@ -79,7 +79,7 @@ fn test_respect_ignore_files() -> anyhow::Result<()> { "); // Test that we can set to false via config file - case.write_file("knot.toml", "respect-ignore-files = false")?; + case.write_file("ty.toml", "respect-ignore-files = false")?; assert_cmd_snapshot!(case.command(), @r" success: false exit_code: 1 @@ -97,7 +97,7 @@ fn test_respect_ignore_files() -> anyhow::Result<()> { "); // Ensure CLI takes precedence - case.write_file("knot.toml", "respect-ignore-files = true")?; + case.write_file("ty.toml", "respect-ignore-files = true")?; assert_cmd_snapshot!(case.command().arg("--no-respect-ignore-files"), @r" success: false exit_code: 1 @@ -123,7 +123,7 @@ fn config_override_python_version() -> anyhow::Result<()> { ( "pyproject.toml", r#" - [tool.knot.environment] + [tool.ty.environment] python-version = "3.11" "#, ), @@ -174,7 +174,7 @@ fn config_override_python_platform() -> anyhow::Result<()> { ( "pyproject.toml", r#" - [tool.knot.environment] + [tool.ty.environment] python-platform = "linux" "#, ), @@ -249,7 +249,7 @@ fn cli_arguments_are_relative_to_the_current_directory() -> anyhow::Result<()> { ( "pyproject.toml", r#" - [tool.knot.environment] + [tool.ty.environment] python-version = "3.11" "#, ), @@ -320,7 +320,7 @@ fn paths_in_configuration_files_are_relative_to_the_project_root() -> anyhow::Re ( "pyproject.toml", r#" - [tool.knot.environment] + [tool.ty.environment] python-version = "3.11" extra-paths = ["libs"] "#, @@ -401,7 +401,7 @@ fn configuration_rule_severity() -> anyhow::Result<()> { case.write_file( "pyproject.toml", r#" - [tool.knot.rules] + [tool.ty.rules] division-by-zero = "warn" # demote to warn possibly-unresolved-reference = "ignore" "#, @@ -604,14 +604,14 @@ fn cli_rule_severity_precedence() -> anyhow::Result<()> { Ok(()) } -/// Red Knot warns about unknown rules specified in a configuration file +/// ty warns about unknown rules specified in a configuration file #[test] fn configuration_unknown_rules() -> anyhow::Result<()> { let case = TestCase::with_files([ ( "pyproject.toml", r#" - [tool.knot.rules] + [tool.ty.rules] division-by-zer = "warn" # incorrect rule name "#, ), @@ -625,7 +625,7 @@ fn configuration_unknown_rules() -> anyhow::Result<()> { warning: unknown-rule --> pyproject.toml:3:1 | - 2 | [tool.knot.rules] + 2 | [tool.ty.rules] 3 | division-by-zer = "warn" # incorrect rule name | ^^^^^^^^^^^^^^^ Unknown lint rule `division-by-zer` | @@ -638,7 +638,7 @@ fn configuration_unknown_rules() -> anyhow::Result<()> { Ok(()) } -/// Red Knot warns about unknown rules specified in a CLI argument +/// ty warns about unknown rules specified in a CLI argument #[test] fn cli_unknown_rules() -> anyhow::Result<()> { let case = TestCase::with_file("test.py", "print(10)")?; @@ -768,7 +768,7 @@ fn exit_code_no_errors_but_error_on_warning_is_enabled_in_configuration() -> any let case = TestCase::with_files([ ("test.py", r"print(x) # [unresolved-reference]"), ( - "knot.toml", + "ty.toml", r#" [terminal] error-on-warning = true @@ -913,7 +913,7 @@ fn exit_code_exit_zero_is_true() -> anyhow::Result<()> { fn user_configuration() -> anyhow::Result<()> { let case = TestCase::with_files([ ( - "project/knot.toml", + "project/ty.toml", r#" [rules] division-by-zero = "warn" @@ -973,7 +973,7 @@ fn user_configuration() -> anyhow::Result<()> { // Changing the level for `division-by-zero` has no effect, because the project-level configuration // has higher precedence. case.write_file( - config_directory.join("knot/knot.toml"), + config_directory.join("ty/ty.toml"), r#" [rules] division-by-zero = "error" @@ -1267,7 +1267,7 @@ impl TestCase { } fn command(&self) -> Command { - let mut command = Command::new(get_cargo_bin("red_knot")); + let mut command = Command::new(get_cargo_bin("ty")); command.current_dir(&self.project_dir).arg("check"); command } diff --git a/crates/red_knot/tests/file_watching.rs b/crates/ty/tests/file_watching.rs similarity index 98% rename from crates/red_knot/tests/file_watching.rs rename to crates/ty/tests/file_watching.rs index acdb7071c7..c8205c9251 100644 --- a/crates/red_knot/tests/file_watching.rs +++ b/crates/ty/tests/file_watching.rs @@ -3,12 +3,6 @@ use std::io::Write; use std::time::{Duration, Instant}; use anyhow::{anyhow, Context}; -use red_knot_project::metadata::options::{EnvironmentOptions, Options}; -use red_knot_project::metadata::pyproject::{PyProject, Tool}; -use red_knot_project::metadata::value::{RangedValue, RelativePathBuf}; -use red_knot_project::watch::{directory_watcher, ChangeEvent, ProjectWatcher}; -use red_knot_project::{Db, ProjectDatabase, ProjectMetadata}; -use red_knot_python_semantic::{resolve_module, ModuleName, PythonPlatform}; use ruff_db::files::{system_path_to_file, File, FileError}; use ruff_db::source::source_text; use ruff_db::system::{ @@ -16,6 +10,12 @@ use ruff_db::system::{ }; use ruff_db::{Db as _, Upcast}; use ruff_python_ast::PythonVersion; +use ty_project::metadata::options::{EnvironmentOptions, Options}; +use ty_project::metadata::pyproject::{PyProject, Tool}; +use ty_project::metadata::value::{RangedValue, RelativePathBuf}; +use ty_project::watch::{directory_watcher, ChangeEvent, ProjectWatcher}; +use ty_project::{Db, ProjectDatabase, ProjectMetadata}; +use ty_python_semantic::{resolve_module, ModuleName, PythonPlatform}; struct TestCase { db: ProjectDatabase, @@ -173,9 +173,7 @@ impl TestCase { self.project_path("pyproject.toml").as_std_path(), toml::to_string(&PyProject { project: None, - tool: Some(Tool { - knot: Some(options), - }), + tool: Some(Tool { ty: Some(options) }), }) .context("Failed to serialize options")?, ) @@ -382,9 +380,7 @@ where project_path.join("pyproject.toml").as_std_path(), toml::to_string(&PyProject { project: None, - tool: Some(Tool { - knot: Some(options), - }), + tool: Some(Tool { ty: Some(options) }), }) .context("Failed to serialize options")?, ) @@ -1546,7 +1542,7 @@ mod unix { // // I further tested how good editor support is for symlinked files and it is not good ;) // * VS Code doesn't update the file content if a file gets changed through a symlink - // * PyCharm doesn't update diagnostics if a symlinked module is changed (same as red knot). + // * PyCharm doesn't update diagnostics if a symlinked module is changed (same as ty). // // That's why I think it's fine to not support this case for now. @@ -1658,7 +1654,7 @@ mod unix { // It would be nice if this is supported but the underlying file system watchers // only emit a single event. For reference // * VS Code doesn't update the file content if a file gets changed through a symlink - // * PyCharm doesn't update diagnostics if a symlinked module is changed (same as red knot). + // * PyCharm doesn't update diagnostics if a symlinked module is changed (same as ty). // We could add support for it by keeping a reverse map from `real_path` to symlinked path but // it doesn't seem worth doing considering that as prominent tools like PyCharm don't support it. // Pyright does support it, thanks to chokidar. @@ -1682,7 +1678,7 @@ fn nested_projects_delete_root() -> anyhow::Result<()> { [project] name = "inner" - [tool.knot] + [tool.ty] "#, )?; @@ -1692,7 +1688,7 @@ fn nested_projects_delete_root() -> anyhow::Result<()> { [project] name = "outer" - [tool.knot] + [tool.ty] "#, )?; @@ -1732,9 +1728,9 @@ fn changes_to_user_configuration() -> anyhow::Result<()> { )?; let config_directory = context.join_root_path("home/.config"); - std::fs::create_dir_all(config_directory.join("knot").as_std_path())?; + std::fs::create_dir_all(config_directory.join("ty").as_std_path())?; std::fs::write( - config_directory.join("knot/knot.toml").as_std_path(), + config_directory.join("ty/ty.toml").as_std_path(), r#" [rules] division-by-zero = "ignore" @@ -1765,14 +1761,14 @@ fn changes_to_user_configuration() -> anyhow::Result<()> { // Enable division-by-zero in the user configuration with warning severity update_file( - case.root_path().join("home/.config/knot/knot.toml"), + case.root_path().join("home/.config/ty/ty.toml"), r#" [rules] division-by-zero = "warn" "#, )?; - let changes = case.stop_watch(event_for_file("knot.toml")); + let changes = case.stop_watch(event_for_file("ty.toml")); case.apply_changes(changes); @@ -1793,7 +1789,7 @@ fn changes_to_user_configuration() -> anyhow::Result<()> { /// /// This test currently fails on case-insensitive systems because `Files` is case-sensitive /// but the `System::metadata` call isn't. This means that -/// Red Knot considers both `Lib.py` and `lib.py` to exist when only `lib.py` does +/// ty considers both `Lib.py` and `lib.py` to exist when only `lib.py` does /// /// The incoming change events then are no-ops because they don't change either file's /// status nor does it update their last modified time (renaming a file doesn't bump it's @@ -1805,7 +1801,7 @@ fn changes_to_user_configuration() -> anyhow::Result<()> { /// `System` calls should be case sensitive. This would be the most consistent /// but might be hard to pull off. /// -/// What the right solution is also depends on if Red Knot itself should be case +/// What the right solution is also depends on if ty itself should be case /// sensitive or not. E.g. should `include="src"` be case sensitive on all systems /// or only on case-sensitive systems? /// diff --git a/crates/red_knot_ide/Cargo.toml b/crates/ty_ide/Cargo.toml similarity index 85% rename from crates/red_knot_ide/Cargo.toml rename to crates/ty_ide/Cargo.toml index 5ac6253852..52a585bd80 100644 --- a/crates/red_knot_ide/Cargo.toml +++ b/crates/ty_ide/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "red_knot_ide" +name = "ty_ide" version = "0.0.0" publish = false authors = { workspace = true } @@ -15,7 +15,7 @@ ruff_db = { workspace = true } ruff_python_ast = { workspace = true } ruff_python_parser = { workspace = true } ruff_text_size = { workspace = true } -red_knot_python_semantic = { workspace = true } +ty_python_semantic = { workspace = true } rustc-hash = { workspace = true } salsa = { workspace = true } @@ -23,7 +23,7 @@ smallvec = { workspace = true } tracing = { workspace = true } [dev-dependencies] -red_knot_vendored = { workspace = true } +ty_vendored = { workspace = true } insta = { workspace = true, features = ["filters"] } diff --git a/crates/red_knot_ide/src/completion.rs b/crates/ty_ide/src/completion.rs similarity index 100% rename from crates/red_knot_ide/src/completion.rs rename to crates/ty_ide/src/completion.rs diff --git a/crates/red_knot_ide/src/db.rs b/crates/ty_ide/src/db.rs similarity index 92% rename from crates/red_knot_ide/src/db.rs rename to crates/ty_ide/src/db.rs index 9d98db1dcb..39ff4b0c04 100644 --- a/crates/red_knot_ide/src/db.rs +++ b/crates/ty_ide/src/db.rs @@ -1,5 +1,5 @@ -use red_knot_python_semantic::Db as SemanticDb; use ruff_db::{Db as SourceDb, Upcast}; +use ty_python_semantic::Db as SemanticDb; #[salsa::db] pub trait Db: SemanticDb + Upcast + Upcast {} @@ -9,12 +9,12 @@ pub(crate) mod tests { use std::sync::Arc; use super::Db; - use red_knot_python_semantic::lint::{LintRegistry, RuleSelection}; - use red_knot_python_semantic::{default_lint_registry, Db as SemanticDb, Program}; use ruff_db::files::{File, Files}; use ruff_db::system::{DbWithTestSystem, System, TestSystem}; use ruff_db::vendored::VendoredFileSystem; use ruff_db::{Db as SourceDb, Upcast}; + use ty_python_semantic::lint::{LintRegistry, RuleSelection}; + use ty_python_semantic::{default_lint_registry, Db as SemanticDb, Program}; #[salsa::db] #[derive(Clone)] @@ -33,7 +33,7 @@ pub(crate) mod tests { Self { storage: salsa::Storage::default(), system: TestSystem::default(), - vendored: red_knot_vendored::file_system().clone(), + vendored: ty_vendored::file_system().clone(), events: Arc::default(), files: Files::default(), rule_selection: Arc::new(RuleSelection::from_registry(default_lint_registry())), diff --git a/crates/red_knot_ide/src/find_node.rs b/crates/ty_ide/src/find_node.rs similarity index 100% rename from crates/red_knot_ide/src/find_node.rs rename to crates/ty_ide/src/find_node.rs diff --git a/crates/red_knot_ide/src/goto.rs b/crates/ty_ide/src/goto.rs similarity index 99% rename from crates/red_knot_ide/src/goto.rs rename to crates/ty_ide/src/goto.rs index a2804bac0b..33fb78a3df 100644 --- a/crates/red_knot_ide/src/goto.rs +++ b/crates/ty_ide/src/goto.rs @@ -1,12 +1,12 @@ use crate::find_node::covering_node; use crate::{Db, HasNavigationTargets, NavigationTargets, RangedValue}; -use red_knot_python_semantic::types::Type; -use red_knot_python_semantic::{HasType, SemanticModel}; use ruff_db::files::{File, FileRange}; use ruff_db::parsed::{parsed_module, ParsedModule}; use ruff_python_ast::{self as ast, AnyNodeRef}; use ruff_python_parser::TokenKind; use ruff_text_size::{Ranged, TextRange, TextSize}; +use ty_python_semantic::types::Type; +use ty_python_semantic::{HasType, SemanticModel}; pub fn goto_type_definition( db: &dyn Db, diff --git a/crates/red_knot_ide/src/hover.rs b/crates/ty_ide/src/hover.rs similarity index 99% rename from crates/red_knot_ide/src/hover.rs rename to crates/ty_ide/src/hover.rs index 700f8276e1..df00a0ccb8 100644 --- a/crates/red_knot_ide/src/hover.rs +++ b/crates/ty_ide/src/hover.rs @@ -1,12 +1,12 @@ use crate::goto::{find_goto_target, GotoTarget}; use crate::{Db, MarkupKind, RangedValue}; -use red_knot_python_semantic::types::Type; -use red_knot_python_semantic::SemanticModel; use ruff_db::files::{File, FileRange}; use ruff_db::parsed::parsed_module; use ruff_text_size::{Ranged, TextSize}; use std::fmt; use std::fmt::Formatter; +use ty_python_semantic::types::Type; +use ty_python_semantic::SemanticModel; pub fn hover(db: &dyn Db, file: File, offset: TextSize) -> Option> { let parsed = parsed_module(db.upcast(), file); diff --git a/crates/red_knot_ide/src/inlay_hints.rs b/crates/ty_ide/src/inlay_hints.rs similarity index 98% rename from crates/red_knot_ide/src/inlay_hints.rs rename to crates/ty_ide/src/inlay_hints.rs index b282b0edfc..f3fc12acca 100644 --- a/crates/red_knot_ide/src/inlay_hints.rs +++ b/crates/ty_ide/src/inlay_hints.rs @@ -1,6 +1,4 @@ use crate::Db; -use red_knot_python_semantic::types::Type; -use red_knot_python_semantic::{HasType, SemanticModel}; use ruff_db::files::File; use ruff_db::parsed::parsed_module; use ruff_python_ast::visitor::source_order::{self, SourceOrderVisitor, TraversalSignal}; @@ -8,6 +6,8 @@ use ruff_python_ast::{AnyNodeRef, Expr, Stmt}; use ruff_text_size::{Ranged, TextRange, TextSize}; use std::fmt; use std::fmt::Formatter; +use ty_python_semantic::types::Type; +use ty_python_semantic::{HasType, SemanticModel}; #[derive(Debug, Clone, Eq, PartialEq)] pub struct InlayHint<'db> { @@ -157,11 +157,11 @@ mod tests { use crate::db::tests::TestDb; - use red_knot_python_semantic::{ - Program, ProgramSettings, PythonPath, PythonPlatform, SearchPathSettings, - }; use ruff_db::system::{DbWithWritableSystem, SystemPathBuf}; use ruff_python_ast::PythonVersion; + use ty_python_semantic::{ + Program, ProgramSettings, PythonPath, PythonPlatform, SearchPathSettings, + }; pub(super) fn inlay_hint_test(source: &str) -> InlayHintTest { const START: &str = ""; diff --git a/crates/red_knot_ide/src/lib.rs b/crates/ty_ide/src/lib.rs similarity index 98% rename from crates/red_knot_ide/src/lib.rs rename to crates/ty_ide/src/lib.rs index a85c0cd1fe..4532b700c3 100644 --- a/crates/red_knot_ide/src/lib.rs +++ b/crates/ty_ide/src/lib.rs @@ -16,9 +16,9 @@ pub use markup::MarkupKind; use rustc_hash::FxHashSet; use std::ops::{Deref, DerefMut}; -use red_knot_python_semantic::types::{Type, TypeDefinition}; use ruff_db::files::{File, FileRange}; use ruff_text_size::{Ranged, TextRange}; +use ty_python_semantic::types::{Type, TypeDefinition}; /// Information associated with a text range. #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] @@ -201,14 +201,14 @@ impl HasNavigationTargets for TypeDefinition<'_> { mod tests { use crate::db::tests::TestDb; use insta::internals::SettingsBindDropGuard; - use red_knot_python_semantic::{ - Program, ProgramSettings, PythonPath, PythonPlatform, SearchPathSettings, - }; use ruff_db::diagnostic::{Diagnostic, DiagnosticFormat, DisplayDiagnosticConfig}; use ruff_db::files::{system_path_to_file, File}; use ruff_db::system::{DbWithWritableSystem, SystemPath, SystemPathBuf}; use ruff_python_ast::PythonVersion; use ruff_text_size::TextSize; + use ty_python_semantic::{ + Program, ProgramSettings, PythonPath, PythonPlatform, SearchPathSettings, + }; pub(super) fn cursor_test(source: &str) -> CursorTest { let mut db = TestDb::new(); diff --git a/crates/red_knot_ide/src/markup.rs b/crates/ty_ide/src/markup.rs similarity index 100% rename from crates/red_knot_ide/src/markup.rs rename to crates/ty_ide/src/markup.rs diff --git a/crates/red_knot_project/Cargo.toml b/crates/ty_project/Cargo.toml similarity index 82% rename from crates/red_knot_project/Cargo.toml rename to crates/ty_project/Cargo.toml index f1659c9f33..c05c3a4a4f 100644 --- a/crates/red_knot_project/Cargo.toml +++ b/crates/ty_project/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "red_knot_project" +name = "ty_project" version = "0.0.0" edition.workspace = true rust-version.workspace = true @@ -18,9 +18,9 @@ ruff_macros = { workspace = true } ruff_python_ast = { workspace = true, features = ["serde"] } ruff_python_formatter = { workspace = true, optional = true } ruff_text_size = { workspace = true } -red_knot_ide = { workspace = true } -red_knot_python_semantic = { workspace = true, features = ["serde"] } -red_knot_vendored = { workspace = true } +ty_ide = { workspace = true } +ty_python_semantic = { workspace = true, features = ["serde"] } +ty_vendored = { workspace = true } anyhow = { workspace = true } crossbeam = { workspace = true } @@ -43,13 +43,13 @@ insta = { workspace = true, features = ["redactions", "ron"] } [features] default = ["zstd"] -deflate = ["red_knot_vendored/deflate"] +deflate = ["ty_vendored/deflate"] schemars = [ "dep:schemars", "ruff_db/schemars", - "red_knot_python_semantic/schemars", + "ty_python_semantic/schemars", ] -zstd = ["red_knot_vendored/zstd"] +zstd = ["ty_vendored/zstd"] format = ["ruff_python_formatter"] [lints] diff --git a/crates/red_knot_project/resources/test/corpus/00_const.py b/crates/ty_project/resources/test/corpus/00_const.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/00_const.py rename to crates/ty_project/resources/test/corpus/00_const.py diff --git a/crates/red_knot_project/resources/test/corpus/00_empty.py b/crates/ty_project/resources/test/corpus/00_empty.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/00_empty.py rename to crates/ty_project/resources/test/corpus/00_empty.py diff --git a/crates/red_knot_project/resources/test/corpus/00_expr_discard.py b/crates/ty_project/resources/test/corpus/00_expr_discard.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/00_expr_discard.py rename to crates/ty_project/resources/test/corpus/00_expr_discard.py diff --git a/crates/red_knot_project/resources/test/corpus/00_expr_var1.py b/crates/ty_project/resources/test/corpus/00_expr_var1.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/00_expr_var1.py rename to crates/ty_project/resources/test/corpus/00_expr_var1.py diff --git a/crates/red_knot_project/resources/test/corpus/01_expr_unary.py b/crates/ty_project/resources/test/corpus/01_expr_unary.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/01_expr_unary.py rename to crates/ty_project/resources/test/corpus/01_expr_unary.py diff --git a/crates/red_knot_project/resources/test/corpus/02_expr_attr.py b/crates/ty_project/resources/test/corpus/02_expr_attr.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/02_expr_attr.py rename to crates/ty_project/resources/test/corpus/02_expr_attr.py diff --git a/crates/red_knot_project/resources/test/corpus/02_expr_attr_multiline.py b/crates/ty_project/resources/test/corpus/02_expr_attr_multiline.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/02_expr_attr_multiline.py rename to crates/ty_project/resources/test/corpus/02_expr_attr_multiline.py diff --git a/crates/red_knot_project/resources/test/corpus/02_expr_attr_multiline_assign.py b/crates/ty_project/resources/test/corpus/02_expr_attr_multiline_assign.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/02_expr_attr_multiline_assign.py rename to crates/ty_project/resources/test/corpus/02_expr_attr_multiline_assign.py diff --git a/crates/red_knot_project/resources/test/corpus/02_expr_bin_bool.py b/crates/ty_project/resources/test/corpus/02_expr_bin_bool.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/02_expr_bin_bool.py rename to crates/ty_project/resources/test/corpus/02_expr_bin_bool.py diff --git a/crates/red_knot_project/resources/test/corpus/02_expr_binary.py b/crates/ty_project/resources/test/corpus/02_expr_binary.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/02_expr_binary.py rename to crates/ty_project/resources/test/corpus/02_expr_binary.py diff --git a/crates/red_knot_project/resources/test/corpus/02_expr_bool_op_multiline.py b/crates/ty_project/resources/test/corpus/02_expr_bool_op_multiline.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/02_expr_bool_op_multiline.py rename to crates/ty_project/resources/test/corpus/02_expr_bool_op_multiline.py diff --git a/crates/red_knot_project/resources/test/corpus/02_expr_bool_op_multiline2.py b/crates/ty_project/resources/test/corpus/02_expr_bool_op_multiline2.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/02_expr_bool_op_multiline2.py rename to crates/ty_project/resources/test/corpus/02_expr_bool_op_multiline2.py diff --git a/crates/red_knot_project/resources/test/corpus/02_expr_rel.py b/crates/ty_project/resources/test/corpus/02_expr_rel.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/02_expr_rel.py rename to crates/ty_project/resources/test/corpus/02_expr_rel.py diff --git a/crates/red_knot_project/resources/test/corpus/02_expr_rel_multiple.py b/crates/ty_project/resources/test/corpus/02_expr_rel_multiple.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/02_expr_rel_multiple.py rename to crates/ty_project/resources/test/corpus/02_expr_rel_multiple.py diff --git a/crates/red_knot_project/resources/test/corpus/02_expr_subscr.py b/crates/ty_project/resources/test/corpus/02_expr_subscr.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/02_expr_subscr.py rename to crates/ty_project/resources/test/corpus/02_expr_subscr.py diff --git a/crates/red_knot_project/resources/test/corpus/03_dict.py b/crates/ty_project/resources/test/corpus/03_dict.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/03_dict.py rename to crates/ty_project/resources/test/corpus/03_dict.py diff --git a/crates/red_knot_project/resources/test/corpus/03_dict_ex.py b/crates/ty_project/resources/test/corpus/03_dict_ex.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/03_dict_ex.py rename to crates/ty_project/resources/test/corpus/03_dict_ex.py diff --git a/crates/red_knot_project/resources/test/corpus/03_dict_literal_large.py b/crates/ty_project/resources/test/corpus/03_dict_literal_large.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/03_dict_literal_large.py rename to crates/ty_project/resources/test/corpus/03_dict_literal_large.py diff --git a/crates/red_knot_project/resources/test/corpus/03_dict_unpack_huge.py b/crates/ty_project/resources/test/corpus/03_dict_unpack_huge.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/03_dict_unpack_huge.py rename to crates/ty_project/resources/test/corpus/03_dict_unpack_huge.py diff --git a/crates/red_knot_project/resources/test/corpus/03_list.py b/crates/ty_project/resources/test/corpus/03_list.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/03_list.py rename to crates/ty_project/resources/test/corpus/03_list.py diff --git a/crates/red_knot_project/resources/test/corpus/03_list_ex.py b/crates/ty_project/resources/test/corpus/03_list_ex.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/03_list_ex.py rename to crates/ty_project/resources/test/corpus/03_list_ex.py diff --git a/crates/red_knot_project/resources/test/corpus/03_list_large.py b/crates/ty_project/resources/test/corpus/03_list_large.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/03_list_large.py rename to crates/ty_project/resources/test/corpus/03_list_large.py diff --git a/crates/red_knot_project/resources/test/corpus/03_set.py b/crates/ty_project/resources/test/corpus/03_set.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/03_set.py rename to crates/ty_project/resources/test/corpus/03_set.py diff --git a/crates/red_knot_project/resources/test/corpus/03_set_multi.py b/crates/ty_project/resources/test/corpus/03_set_multi.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/03_set_multi.py rename to crates/ty_project/resources/test/corpus/03_set_multi.py diff --git a/crates/red_knot_project/resources/test/corpus/03_slice.py b/crates/ty_project/resources/test/corpus/03_slice.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/03_slice.py rename to crates/ty_project/resources/test/corpus/03_slice.py diff --git a/crates/red_knot_project/resources/test/corpus/03_slice_ext.py b/crates/ty_project/resources/test/corpus/03_slice_ext.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/03_slice_ext.py rename to crates/ty_project/resources/test/corpus/03_slice_ext.py diff --git a/crates/red_knot_project/resources/test/corpus/03_tuple.py b/crates/ty_project/resources/test/corpus/03_tuple.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/03_tuple.py rename to crates/ty_project/resources/test/corpus/03_tuple.py diff --git a/crates/red_knot_project/resources/test/corpus/03_tuple_ex.py b/crates/ty_project/resources/test/corpus/03_tuple_ex.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/03_tuple_ex.py rename to crates/ty_project/resources/test/corpus/03_tuple_ex.py diff --git a/crates/red_knot_project/resources/test/corpus/04_assign.py b/crates/ty_project/resources/test/corpus/04_assign.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/04_assign.py rename to crates/ty_project/resources/test/corpus/04_assign.py diff --git a/crates/red_knot_project/resources/test/corpus/04_assign_attr.py b/crates/ty_project/resources/test/corpus/04_assign_attr.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/04_assign_attr.py rename to crates/ty_project/resources/test/corpus/04_assign_attr.py diff --git a/crates/red_knot_project/resources/test/corpus/04_assign_attr_func.py b/crates/ty_project/resources/test/corpus/04_assign_attr_func.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/04_assign_attr_func.py rename to crates/ty_project/resources/test/corpus/04_assign_attr_func.py diff --git a/crates/red_knot_project/resources/test/corpus/04_assign_invalid_target.py b/crates/ty_project/resources/test/corpus/04_assign_invalid_target.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/04_assign_invalid_target.py rename to crates/ty_project/resources/test/corpus/04_assign_invalid_target.py diff --git a/crates/red_knot_project/resources/test/corpus/04_assign_named_expr.py b/crates/ty_project/resources/test/corpus/04_assign_named_expr.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/04_assign_named_expr.py rename to crates/ty_project/resources/test/corpus/04_assign_named_expr.py diff --git a/crates/red_knot_project/resources/test/corpus/04_assign_named_expr_invalid_target.py b/crates/ty_project/resources/test/corpus/04_assign_named_expr_invalid_target.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/04_assign_named_expr_invalid_target.py rename to crates/ty_project/resources/test/corpus/04_assign_named_expr_invalid_target.py diff --git a/crates/red_knot_project/resources/test/corpus/04_assign_subscr.py b/crates/ty_project/resources/test/corpus/04_assign_subscr.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/04_assign_subscr.py rename to crates/ty_project/resources/test/corpus/04_assign_subscr.py diff --git a/crates/red_knot_project/resources/test/corpus/04_assign_unpack.py b/crates/ty_project/resources/test/corpus/04_assign_unpack.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/04_assign_unpack.py rename to crates/ty_project/resources/test/corpus/04_assign_unpack.py diff --git a/crates/red_knot_project/resources/test/corpus/04_assign_unpack_ex.py b/crates/ty_project/resources/test/corpus/04_assign_unpack_ex.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/04_assign_unpack_ex.py rename to crates/ty_project/resources/test/corpus/04_assign_unpack_ex.py diff --git a/crates/red_knot_project/resources/test/corpus/04_assign_unpack_tuple.py b/crates/ty_project/resources/test/corpus/04_assign_unpack_tuple.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/04_assign_unpack_tuple.py rename to crates/ty_project/resources/test/corpus/04_assign_unpack_tuple.py diff --git a/crates/red_knot_project/resources/test/corpus/04_aug_assign.py b/crates/ty_project/resources/test/corpus/04_aug_assign.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/04_aug_assign.py rename to crates/ty_project/resources/test/corpus/04_aug_assign.py diff --git a/crates/red_knot_project/resources/test/corpus/04_aug_assign_attr_multiline.py b/crates/ty_project/resources/test/corpus/04_aug_assign_attr_multiline.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/04_aug_assign_attr_multiline.py rename to crates/ty_project/resources/test/corpus/04_aug_assign_attr_multiline.py diff --git a/crates/red_knot_project/resources/test/corpus/04_aug_assign_attr_sub.py b/crates/ty_project/resources/test/corpus/04_aug_assign_attr_sub.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/04_aug_assign_attr_sub.py rename to crates/ty_project/resources/test/corpus/04_aug_assign_attr_sub.py diff --git a/crates/red_knot_project/resources/test/corpus/04_aug_assign_invalid_target.py b/crates/ty_project/resources/test/corpus/04_aug_assign_invalid_target.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/04_aug_assign_invalid_target.py rename to crates/ty_project/resources/test/corpus/04_aug_assign_invalid_target.py diff --git a/crates/red_knot_project/resources/test/corpus/05_funcall.py b/crates/ty_project/resources/test/corpus/05_funcall.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/05_funcall.py rename to crates/ty_project/resources/test/corpus/05_funcall.py diff --git a/crates/red_knot_project/resources/test/corpus/05_funcall_1.py b/crates/ty_project/resources/test/corpus/05_funcall_1.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/05_funcall_1.py rename to crates/ty_project/resources/test/corpus/05_funcall_1.py diff --git a/crates/red_knot_project/resources/test/corpus/05_funcall_2.py b/crates/ty_project/resources/test/corpus/05_funcall_2.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/05_funcall_2.py rename to crates/ty_project/resources/test/corpus/05_funcall_2.py diff --git a/crates/red_knot_project/resources/test/corpus/05_funcall_in_multiline_tuple.py b/crates/ty_project/resources/test/corpus/05_funcall_in_multiline_tuple.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/05_funcall_in_multiline_tuple.py rename to crates/ty_project/resources/test/corpus/05_funcall_in_multiline_tuple.py diff --git a/crates/red_knot_project/resources/test/corpus/05_funcall_kw.py b/crates/ty_project/resources/test/corpus/05_funcall_kw.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/05_funcall_kw.py rename to crates/ty_project/resources/test/corpus/05_funcall_kw.py diff --git a/crates/red_knot_project/resources/test/corpus/05_funcall_kw_many.py b/crates/ty_project/resources/test/corpus/05_funcall_kw_many.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/05_funcall_kw_many.py rename to crates/ty_project/resources/test/corpus/05_funcall_kw_many.py diff --git a/crates/red_knot_project/resources/test/corpus/05_funcall_kw_pos.py b/crates/ty_project/resources/test/corpus/05_funcall_kw_pos.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/05_funcall_kw_pos.py rename to crates/ty_project/resources/test/corpus/05_funcall_kw_pos.py diff --git a/crates/red_knot_project/resources/test/corpus/05_funcall_method_multiline.py b/crates/ty_project/resources/test/corpus/05_funcall_method_multiline.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/05_funcall_method_multiline.py rename to crates/ty_project/resources/test/corpus/05_funcall_method_multiline.py diff --git a/crates/red_knot_project/resources/test/corpus/06_funcall_kwargs.py b/crates/ty_project/resources/test/corpus/06_funcall_kwargs.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/06_funcall_kwargs.py rename to crates/ty_project/resources/test/corpus/06_funcall_kwargs.py diff --git a/crates/red_knot_project/resources/test/corpus/06_funcall_many_args.py b/crates/ty_project/resources/test/corpus/06_funcall_many_args.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/06_funcall_many_args.py rename to crates/ty_project/resources/test/corpus/06_funcall_many_args.py diff --git a/crates/red_knot_project/resources/test/corpus/06_funcall_starargs_ex.py b/crates/ty_project/resources/test/corpus/06_funcall_starargs_ex.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/06_funcall_starargs_ex.py rename to crates/ty_project/resources/test/corpus/06_funcall_starargs_ex.py diff --git a/crates/red_knot_project/resources/test/corpus/06_funcall_varargs.py b/crates/ty_project/resources/test/corpus/06_funcall_varargs.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/06_funcall_varargs.py rename to crates/ty_project/resources/test/corpus/06_funcall_varargs.py diff --git a/crates/red_knot_project/resources/test/corpus/06_funcall_varargs_kwargs.py b/crates/ty_project/resources/test/corpus/06_funcall_varargs_kwargs.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/06_funcall_varargs_kwargs.py rename to crates/ty_project/resources/test/corpus/06_funcall_varargs_kwargs.py diff --git a/crates/red_knot_project/resources/test/corpus/06_funcall_varargs_kwargs_mixed.py b/crates/ty_project/resources/test/corpus/06_funcall_varargs_kwargs_mixed.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/06_funcall_varargs_kwargs_mixed.py rename to crates/ty_project/resources/test/corpus/06_funcall_varargs_kwargs_mixed.py diff --git a/crates/red_knot_project/resources/test/corpus/07_ifexpr.py b/crates/ty_project/resources/test/corpus/07_ifexpr.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/07_ifexpr.py rename to crates/ty_project/resources/test/corpus/07_ifexpr.py diff --git a/crates/red_knot_project/resources/test/corpus/07_ifexpr_multiline.py b/crates/ty_project/resources/test/corpus/07_ifexpr_multiline.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/07_ifexpr_multiline.py rename to crates/ty_project/resources/test/corpus/07_ifexpr_multiline.py diff --git a/crates/red_knot_project/resources/test/corpus/07_ifexpr_multiline2.py b/crates/ty_project/resources/test/corpus/07_ifexpr_multiline2.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/07_ifexpr_multiline2.py rename to crates/ty_project/resources/test/corpus/07_ifexpr_multiline2.py diff --git a/crates/red_knot_project/resources/test/corpus/08_del.py b/crates/ty_project/resources/test/corpus/08_del.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/08_del.py rename to crates/ty_project/resources/test/corpus/08_del.py diff --git a/crates/red_knot_project/resources/test/corpus/08_del_multi.py b/crates/ty_project/resources/test/corpus/08_del_multi.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/08_del_multi.py rename to crates/ty_project/resources/test/corpus/08_del_multi.py diff --git a/crates/red_knot_project/resources/test/corpus/09_pass.py b/crates/ty_project/resources/test/corpus/09_pass.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/09_pass.py rename to crates/ty_project/resources/test/corpus/09_pass.py diff --git a/crates/red_knot_project/resources/test/corpus/10_if.py b/crates/ty_project/resources/test/corpus/10_if.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/10_if.py rename to crates/ty_project/resources/test/corpus/10_if.py diff --git a/crates/red_knot_project/resources/test/corpus/10_if_chained_compare.py b/crates/ty_project/resources/test/corpus/10_if_chained_compare.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/10_if_chained_compare.py rename to crates/ty_project/resources/test/corpus/10_if_chained_compare.py diff --git a/crates/red_knot_project/resources/test/corpus/10_if_false.py b/crates/ty_project/resources/test/corpus/10_if_false.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/10_if_false.py rename to crates/ty_project/resources/test/corpus/10_if_false.py diff --git a/crates/red_knot_project/resources/test/corpus/10_if_invalid.py b/crates/ty_project/resources/test/corpus/10_if_invalid.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/10_if_invalid.py rename to crates/ty_project/resources/test/corpus/10_if_invalid.py diff --git a/crates/red_knot_project/resources/test/corpus/10_if_true.py b/crates/ty_project/resources/test/corpus/10_if_true.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/10_if_true.py rename to crates/ty_project/resources/test/corpus/10_if_true.py diff --git a/crates/red_knot_project/resources/test/corpus/10_if_with_named_expr.py b/crates/ty_project/resources/test/corpus/10_if_with_named_expr.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/10_if_with_named_expr.py rename to crates/ty_project/resources/test/corpus/10_if_with_named_expr.py diff --git a/crates/red_knot_project/resources/test/corpus/11_if_else.py b/crates/ty_project/resources/test/corpus/11_if_else.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/11_if_else.py rename to crates/ty_project/resources/test/corpus/11_if_else.py diff --git a/crates/red_knot_project/resources/test/corpus/11_if_else_deeply_nested_for.py b/crates/ty_project/resources/test/corpus/11_if_else_deeply_nested_for.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/11_if_else_deeply_nested_for.py rename to crates/ty_project/resources/test/corpus/11_if_else_deeply_nested_for.py diff --git a/crates/red_knot_project/resources/test/corpus/11_if_else_false.py b/crates/ty_project/resources/test/corpus/11_if_else_false.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/11_if_else_false.py rename to crates/ty_project/resources/test/corpus/11_if_else_false.py diff --git a/crates/red_knot_project/resources/test/corpus/11_if_else_true.py b/crates/ty_project/resources/test/corpus/11_if_else_true.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/11_if_else_true.py rename to crates/ty_project/resources/test/corpus/11_if_else_true.py diff --git a/crates/red_knot_project/resources/test/corpus/12_if_elif.py b/crates/ty_project/resources/test/corpus/12_if_elif.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/12_if_elif.py rename to crates/ty_project/resources/test/corpus/12_if_elif.py diff --git a/crates/red_knot_project/resources/test/corpus/12_if_elif_else.py b/crates/ty_project/resources/test/corpus/12_if_elif_else.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/12_if_elif_else.py rename to crates/ty_project/resources/test/corpus/12_if_elif_else.py diff --git a/crates/red_knot_project/resources/test/corpus/13_ifelse_complex1.py b/crates/ty_project/resources/test/corpus/13_ifelse_complex1.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/13_ifelse_complex1.py rename to crates/ty_project/resources/test/corpus/13_ifelse_complex1.py diff --git a/crates/red_knot_project/resources/test/corpus/13_ifelse_many.py b/crates/ty_project/resources/test/corpus/13_ifelse_many.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/13_ifelse_many.py rename to crates/ty_project/resources/test/corpus/13_ifelse_many.py diff --git a/crates/red_knot_project/resources/test/corpus/15_while.py b/crates/ty_project/resources/test/corpus/15_while.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/15_while.py rename to crates/ty_project/resources/test/corpus/15_while.py diff --git a/crates/red_knot_project/resources/test/corpus/15_while_break.py b/crates/ty_project/resources/test/corpus/15_while_break.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/15_while_break.py rename to crates/ty_project/resources/test/corpus/15_while_break.py diff --git a/crates/red_knot_project/resources/test/corpus/15_while_break_in_finally.py b/crates/ty_project/resources/test/corpus/15_while_break_in_finally.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/15_while_break_in_finally.py rename to crates/ty_project/resources/test/corpus/15_while_break_in_finally.py diff --git a/crates/red_knot_project/resources/test/corpus/15_while_break_invalid_in_class.py b/crates/ty_project/resources/test/corpus/15_while_break_invalid_in_class.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/15_while_break_invalid_in_class.py rename to crates/ty_project/resources/test/corpus/15_while_break_invalid_in_class.py diff --git a/crates/red_knot_project/resources/test/corpus/15_while_break_invalid_in_func.py b/crates/ty_project/resources/test/corpus/15_while_break_invalid_in_func.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/15_while_break_invalid_in_func.py rename to crates/ty_project/resources/test/corpus/15_while_break_invalid_in_func.py diff --git a/crates/red_knot_project/resources/test/corpus/15_while_break_non_empty.py b/crates/ty_project/resources/test/corpus/15_while_break_non_empty.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/15_while_break_non_empty.py rename to crates/ty_project/resources/test/corpus/15_while_break_non_empty.py diff --git a/crates/red_knot_project/resources/test/corpus/15_while_break_non_exit.py b/crates/ty_project/resources/test/corpus/15_while_break_non_exit.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/15_while_break_non_exit.py rename to crates/ty_project/resources/test/corpus/15_while_break_non_exit.py diff --git a/crates/red_knot_project/resources/test/corpus/15_while_continue.py b/crates/ty_project/resources/test/corpus/15_while_continue.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/15_while_continue.py rename to crates/ty_project/resources/test/corpus/15_while_continue.py diff --git a/crates/red_knot_project/resources/test/corpus/15_while_false.py b/crates/ty_project/resources/test/corpus/15_while_false.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/15_while_false.py rename to crates/ty_project/resources/test/corpus/15_while_false.py diff --git a/crates/red_knot_project/resources/test/corpus/15_while_infinite.py b/crates/ty_project/resources/test/corpus/15_while_infinite.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/15_while_infinite.py rename to crates/ty_project/resources/test/corpus/15_while_infinite.py diff --git a/crates/red_knot_project/resources/test/corpus/15_while_true.py b/crates/ty_project/resources/test/corpus/15_while_true.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/15_while_true.py rename to crates/ty_project/resources/test/corpus/15_while_true.py diff --git a/crates/red_knot_project/resources/test/corpus/16_for.py b/crates/ty_project/resources/test/corpus/16_for.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/16_for.py rename to crates/ty_project/resources/test/corpus/16_for.py diff --git a/crates/red_knot_project/resources/test/corpus/16_for_break.py b/crates/ty_project/resources/test/corpus/16_for_break.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/16_for_break.py rename to crates/ty_project/resources/test/corpus/16_for_break.py diff --git a/crates/red_knot_project/resources/test/corpus/16_for_break_invalid_in_class.py b/crates/ty_project/resources/test/corpus/16_for_break_invalid_in_class.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/16_for_break_invalid_in_class.py rename to crates/ty_project/resources/test/corpus/16_for_break_invalid_in_class.py diff --git a/crates/red_knot_project/resources/test/corpus/16_for_break_invalid_in_func.py b/crates/ty_project/resources/test/corpus/16_for_break_invalid_in_func.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/16_for_break_invalid_in_func.py rename to crates/ty_project/resources/test/corpus/16_for_break_invalid_in_func.py diff --git a/crates/red_knot_project/resources/test/corpus/16_for_continue.py b/crates/ty_project/resources/test/corpus/16_for_continue.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/16_for_continue.py rename to crates/ty_project/resources/test/corpus/16_for_continue.py diff --git a/crates/red_knot_project/resources/test/corpus/16_for_else.py b/crates/ty_project/resources/test/corpus/16_for_else.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/16_for_else.py rename to crates/ty_project/resources/test/corpus/16_for_else.py diff --git a/crates/red_knot_project/resources/test/corpus/16_for_invalid.py b/crates/ty_project/resources/test/corpus/16_for_invalid.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/16_for_invalid.py rename to crates/ty_project/resources/test/corpus/16_for_invalid.py diff --git a/crates/red_knot_project/resources/test/corpus/16_for_list_literal.py b/crates/ty_project/resources/test/corpus/16_for_list_literal.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/16_for_list_literal.py rename to crates/ty_project/resources/test/corpus/16_for_list_literal.py diff --git a/crates/red_knot_project/resources/test/corpus/16_for_nested_ifs.py b/crates/ty_project/resources/test/corpus/16_for_nested_ifs.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/16_for_nested_ifs.py rename to crates/ty_project/resources/test/corpus/16_for_nested_ifs.py diff --git a/crates/red_knot_project/resources/test/corpus/20_lambda.py b/crates/ty_project/resources/test/corpus/20_lambda.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/20_lambda.py rename to crates/ty_project/resources/test/corpus/20_lambda.py diff --git a/crates/red_knot_project/resources/test/corpus/20_lambda_const.py b/crates/ty_project/resources/test/corpus/20_lambda_const.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/20_lambda_const.py rename to crates/ty_project/resources/test/corpus/20_lambda_const.py diff --git a/crates/red_knot_project/resources/test/corpus/20_lambda_default_arg.py b/crates/ty_project/resources/test/corpus/20_lambda_default_arg.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/20_lambda_default_arg.py rename to crates/ty_project/resources/test/corpus/20_lambda_default_arg.py diff --git a/crates/red_knot_project/resources/test/corpus/20_lambda_ifelse.py b/crates/ty_project/resources/test/corpus/20_lambda_ifelse.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/20_lambda_ifelse.py rename to crates/ty_project/resources/test/corpus/20_lambda_ifelse.py diff --git a/crates/red_knot_project/resources/test/corpus/21_func1.py b/crates/ty_project/resources/test/corpus/21_func1.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/21_func1.py rename to crates/ty_project/resources/test/corpus/21_func1.py diff --git a/crates/red_knot_project/resources/test/corpus/21_func1_ret.py b/crates/ty_project/resources/test/corpus/21_func1_ret.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/21_func1_ret.py rename to crates/ty_project/resources/test/corpus/21_func1_ret.py diff --git a/crates/red_knot_project/resources/test/corpus/21_func_assign.py b/crates/ty_project/resources/test/corpus/21_func_assign.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/21_func_assign.py rename to crates/ty_project/resources/test/corpus/21_func_assign.py diff --git a/crates/red_knot_project/resources/test/corpus/21_func_assign2.py b/crates/ty_project/resources/test/corpus/21_func_assign2.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/21_func_assign2.py rename to crates/ty_project/resources/test/corpus/21_func_assign2.py diff --git a/crates/red_knot_project/resources/test/corpus/22_func_arg.py b/crates/ty_project/resources/test/corpus/22_func_arg.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/22_func_arg.py rename to crates/ty_project/resources/test/corpus/22_func_arg.py diff --git a/crates/red_knot_project/resources/test/corpus/22_func_vararg.py b/crates/ty_project/resources/test/corpus/22_func_vararg.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/22_func_vararg.py rename to crates/ty_project/resources/test/corpus/22_func_vararg.py diff --git a/crates/red_knot_project/resources/test/corpus/23_func_ret.py b/crates/ty_project/resources/test/corpus/23_func_ret.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/23_func_ret.py rename to crates/ty_project/resources/test/corpus/23_func_ret.py diff --git a/crates/red_knot_project/resources/test/corpus/23_func_ret_val.py b/crates/ty_project/resources/test/corpus/23_func_ret_val.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/23_func_ret_val.py rename to crates/ty_project/resources/test/corpus/23_func_ret_val.py diff --git a/crates/red_knot_project/resources/test/corpus/24_func_if_ret.py b/crates/ty_project/resources/test/corpus/24_func_if_ret.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/24_func_if_ret.py rename to crates/ty_project/resources/test/corpus/24_func_if_ret.py diff --git a/crates/red_knot_project/resources/test/corpus/24_func_ifelse_ret.py b/crates/ty_project/resources/test/corpus/24_func_ifelse_ret.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/24_func_ifelse_ret.py rename to crates/ty_project/resources/test/corpus/24_func_ifelse_ret.py diff --git a/crates/red_knot_project/resources/test/corpus/24_func_ifnot_ret.py b/crates/ty_project/resources/test/corpus/24_func_ifnot_ret.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/24_func_ifnot_ret.py rename to crates/ty_project/resources/test/corpus/24_func_ifnot_ret.py diff --git a/crates/red_knot_project/resources/test/corpus/25_func_annotations.py b/crates/ty_project/resources/test/corpus/25_func_annotations.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/25_func_annotations.py rename to crates/ty_project/resources/test/corpus/25_func_annotations.py diff --git a/crates/red_knot_project/resources/test/corpus/25_func_annotations_nested.py b/crates/ty_project/resources/test/corpus/25_func_annotations_nested.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/25_func_annotations_nested.py rename to crates/ty_project/resources/test/corpus/25_func_annotations_nested.py diff --git a/crates/red_knot_project/resources/test/corpus/25_func_annotations_same_name.py b/crates/ty_project/resources/test/corpus/25_func_annotations_same_name.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/25_func_annotations_same_name.py rename to crates/ty_project/resources/test/corpus/25_func_annotations_same_name.py diff --git a/crates/red_knot_project/resources/test/corpus/25_func_annotations_scope.py b/crates/ty_project/resources/test/corpus/25_func_annotations_scope.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/25_func_annotations_scope.py rename to crates/ty_project/resources/test/corpus/25_func_annotations_scope.py diff --git a/crates/red_knot_project/resources/test/corpus/25_func_annotations_starred.py b/crates/ty_project/resources/test/corpus/25_func_annotations_starred.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/25_func_annotations_starred.py rename to crates/ty_project/resources/test/corpus/25_func_annotations_starred.py diff --git a/crates/red_knot_project/resources/test/corpus/26_func_const_defaults.py b/crates/ty_project/resources/test/corpus/26_func_const_defaults.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/26_func_const_defaults.py rename to crates/ty_project/resources/test/corpus/26_func_const_defaults.py diff --git a/crates/red_knot_project/resources/test/corpus/26_func_defaults_same_name.py b/crates/ty_project/resources/test/corpus/26_func_defaults_same_name.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/26_func_defaults_same_name.py rename to crates/ty_project/resources/test/corpus/26_func_defaults_same_name.py diff --git a/crates/red_knot_project/resources/test/corpus/27_func_generic.py b/crates/ty_project/resources/test/corpus/27_func_generic.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/27_func_generic.py rename to crates/ty_project/resources/test/corpus/27_func_generic.py diff --git a/crates/red_knot_project/resources/test/corpus/27_func_generic_bound.py b/crates/ty_project/resources/test/corpus/27_func_generic_bound.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/27_func_generic_bound.py rename to crates/ty_project/resources/test/corpus/27_func_generic_bound.py diff --git a/crates/red_knot_project/resources/test/corpus/27_func_generic_constraint.py b/crates/ty_project/resources/test/corpus/27_func_generic_constraint.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/27_func_generic_constraint.py rename to crates/ty_project/resources/test/corpus/27_func_generic_constraint.py diff --git a/crates/red_knot_project/resources/test/corpus/27_func_generic_default.py b/crates/ty_project/resources/test/corpus/27_func_generic_default.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/27_func_generic_default.py rename to crates/ty_project/resources/test/corpus/27_func_generic_default.py diff --git a/crates/red_knot_project/resources/test/corpus/27_func_generic_paramspec.py b/crates/ty_project/resources/test/corpus/27_func_generic_paramspec.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/27_func_generic_paramspec.py rename to crates/ty_project/resources/test/corpus/27_func_generic_paramspec.py diff --git a/crates/red_knot_project/resources/test/corpus/27_func_generic_paramspec_default.py b/crates/ty_project/resources/test/corpus/27_func_generic_paramspec_default.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/27_func_generic_paramspec_default.py rename to crates/ty_project/resources/test/corpus/27_func_generic_paramspec_default.py diff --git a/crates/red_knot_project/resources/test/corpus/27_func_generic_tuple.py b/crates/ty_project/resources/test/corpus/27_func_generic_tuple.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/27_func_generic_tuple.py rename to crates/ty_project/resources/test/corpus/27_func_generic_tuple.py diff --git a/crates/red_knot_project/resources/test/corpus/27_func_generic_tuple_default.py b/crates/ty_project/resources/test/corpus/27_func_generic_tuple_default.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/27_func_generic_tuple_default.py rename to crates/ty_project/resources/test/corpus/27_func_generic_tuple_default.py diff --git a/crates/red_knot_project/resources/test/corpus/30_func_enclosed.py b/crates/ty_project/resources/test/corpus/30_func_enclosed.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/30_func_enclosed.py rename to crates/ty_project/resources/test/corpus/30_func_enclosed.py diff --git a/crates/red_knot_project/resources/test/corpus/30_func_enclosed_many.py b/crates/ty_project/resources/test/corpus/30_func_enclosed_many.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/30_func_enclosed_many.py rename to crates/ty_project/resources/test/corpus/30_func_enclosed_many.py diff --git a/crates/red_knot_project/resources/test/corpus/31_func_global.py b/crates/ty_project/resources/test/corpus/31_func_global.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/31_func_global.py rename to crates/ty_project/resources/test/corpus/31_func_global.py diff --git a/crates/red_knot_project/resources/test/corpus/31_func_global_annotated_later.py b/crates/ty_project/resources/test/corpus/31_func_global_annotated_later.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/31_func_global_annotated_later.py rename to crates/ty_project/resources/test/corpus/31_func_global_annotated_later.py diff --git a/crates/red_knot_project/resources/test/corpus/31_func_nonlocal.py b/crates/ty_project/resources/test/corpus/31_func_nonlocal.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/31_func_nonlocal.py rename to crates/ty_project/resources/test/corpus/31_func_nonlocal.py diff --git a/crates/red_knot_project/resources/test/corpus/32_func_global_nested.py b/crates/ty_project/resources/test/corpus/32_func_global_nested.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/32_func_global_nested.py rename to crates/ty_project/resources/test/corpus/32_func_global_nested.py diff --git a/crates/red_knot_project/resources/test/corpus/33_func_with_docstring_optimizable_tuple_and_return.py b/crates/ty_project/resources/test/corpus/33_func_with_docstring_optimizable_tuple_and_return.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/33_func_with_docstring_optimizable_tuple_and_return.py rename to crates/ty_project/resources/test/corpus/33_func_with_docstring_optimizable_tuple_and_return.py diff --git a/crates/red_knot_project/resources/test/corpus/40_import.py b/crates/ty_project/resources/test/corpus/40_import.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/40_import.py rename to crates/ty_project/resources/test/corpus/40_import.py diff --git a/crates/red_knot_project/resources/test/corpus/41_from_import.py b/crates/ty_project/resources/test/corpus/41_from_import.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/41_from_import.py rename to crates/ty_project/resources/test/corpus/41_from_import.py diff --git a/crates/red_knot_project/resources/test/corpus/42_import_from_dot.py b/crates/ty_project/resources/test/corpus/42_import_from_dot.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/42_import_from_dot.py rename to crates/ty_project/resources/test/corpus/42_import_from_dot.py diff --git a/crates/red_knot_project/resources/test/corpus/50_yield.py b/crates/ty_project/resources/test/corpus/50_yield.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/50_yield.py rename to crates/ty_project/resources/test/corpus/50_yield.py diff --git a/crates/red_knot_project/resources/test/corpus/51_gen_comp.py b/crates/ty_project/resources/test/corpus/51_gen_comp.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/51_gen_comp.py rename to crates/ty_project/resources/test/corpus/51_gen_comp.py diff --git a/crates/red_knot_project/resources/test/corpus/51_gen_comp2.py b/crates/ty_project/resources/test/corpus/51_gen_comp2.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/51_gen_comp2.py rename to crates/ty_project/resources/test/corpus/51_gen_comp2.py diff --git a/crates/red_knot_project/resources/test/corpus/52_gen_comp_if.py b/crates/ty_project/resources/test/corpus/52_gen_comp_if.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/52_gen_comp_if.py rename to crates/ty_project/resources/test/corpus/52_gen_comp_if.py diff --git a/crates/red_knot_project/resources/test/corpus/53_dict_comp.py b/crates/ty_project/resources/test/corpus/53_dict_comp.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/53_dict_comp.py rename to crates/ty_project/resources/test/corpus/53_dict_comp.py diff --git a/crates/red_knot_project/resources/test/corpus/53_list_comp.py b/crates/ty_project/resources/test/corpus/53_list_comp.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/53_list_comp.py rename to crates/ty_project/resources/test/corpus/53_list_comp.py diff --git a/crates/red_knot_project/resources/test/corpus/53_list_comp_method.py b/crates/ty_project/resources/test/corpus/53_list_comp_method.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/53_list_comp_method.py rename to crates/ty_project/resources/test/corpus/53_list_comp_method.py diff --git a/crates/red_knot_project/resources/test/corpus/53_set_comp.py b/crates/ty_project/resources/test/corpus/53_set_comp.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/53_set_comp.py rename to crates/ty_project/resources/test/corpus/53_set_comp.py diff --git a/crates/red_knot_project/resources/test/corpus/54_list_comp_func.py b/crates/ty_project/resources/test/corpus/54_list_comp_func.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/54_list_comp_func.py rename to crates/ty_project/resources/test/corpus/54_list_comp_func.py diff --git a/crates/red_knot_project/resources/test/corpus/54_list_comp_lambda.py b/crates/ty_project/resources/test/corpus/54_list_comp_lambda.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/54_list_comp_lambda.py rename to crates/ty_project/resources/test/corpus/54_list_comp_lambda.py diff --git a/crates/red_knot_project/resources/test/corpus/54_list_comp_lambda_listcomp.py b/crates/ty_project/resources/test/corpus/54_list_comp_lambda_listcomp.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/54_list_comp_lambda_listcomp.py rename to crates/ty_project/resources/test/corpus/54_list_comp_lambda_listcomp.py diff --git a/crates/red_knot_project/resources/test/corpus/54_list_comp_recur_func.py b/crates/ty_project/resources/test/corpus/54_list_comp_recur_func.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/54_list_comp_recur_func.py rename to crates/ty_project/resources/test/corpus/54_list_comp_recur_func.py diff --git a/crates/red_knot_project/resources/test/corpus/55_list_comp_nested.py b/crates/ty_project/resources/test/corpus/55_list_comp_nested.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/55_list_comp_nested.py rename to crates/ty_project/resources/test/corpus/55_list_comp_nested.py diff --git a/crates/red_knot_project/resources/test/corpus/56_yield_from.py b/crates/ty_project/resources/test/corpus/56_yield_from.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/56_yield_from.py rename to crates/ty_project/resources/test/corpus/56_yield_from.py diff --git a/crates/red_knot_project/resources/test/corpus/57_await.py b/crates/ty_project/resources/test/corpus/57_await.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/57_await.py rename to crates/ty_project/resources/test/corpus/57_await.py diff --git a/crates/red_knot_project/resources/test/corpus/58_async_for.py b/crates/ty_project/resources/test/corpus/58_async_for.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/58_async_for.py rename to crates/ty_project/resources/test/corpus/58_async_for.py diff --git a/crates/red_knot_project/resources/test/corpus/58_async_for_break.py b/crates/ty_project/resources/test/corpus/58_async_for_break.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/58_async_for_break.py rename to crates/ty_project/resources/test/corpus/58_async_for_break.py diff --git a/crates/red_knot_project/resources/test/corpus/58_async_for_continue.py b/crates/ty_project/resources/test/corpus/58_async_for_continue.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/58_async_for_continue.py rename to crates/ty_project/resources/test/corpus/58_async_for_continue.py diff --git a/crates/red_knot_project/resources/test/corpus/58_async_for_dict_comp.py b/crates/ty_project/resources/test/corpus/58_async_for_dict_comp.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/58_async_for_dict_comp.py rename to crates/ty_project/resources/test/corpus/58_async_for_dict_comp.py diff --git a/crates/red_knot_project/resources/test/corpus/58_async_for_else.py b/crates/ty_project/resources/test/corpus/58_async_for_else.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/58_async_for_else.py rename to crates/ty_project/resources/test/corpus/58_async_for_else.py diff --git a/crates/red_knot_project/resources/test/corpus/58_async_for_gen_comp.py b/crates/ty_project/resources/test/corpus/58_async_for_gen_comp.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/58_async_for_gen_comp.py rename to crates/ty_project/resources/test/corpus/58_async_for_gen_comp.py diff --git a/crates/red_knot_project/resources/test/corpus/58_async_for_list_comp.py b/crates/ty_project/resources/test/corpus/58_async_for_list_comp.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/58_async_for_list_comp.py rename to crates/ty_project/resources/test/corpus/58_async_for_list_comp.py diff --git a/crates/red_knot_project/resources/test/corpus/58_async_for_set_comp.py b/crates/ty_project/resources/test/corpus/58_async_for_set_comp.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/58_async_for_set_comp.py rename to crates/ty_project/resources/test/corpus/58_async_for_set_comp.py diff --git a/crates/red_knot_project/resources/test/corpus/59_async_with.py b/crates/ty_project/resources/test/corpus/59_async_with.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/59_async_with.py rename to crates/ty_project/resources/test/corpus/59_async_with.py diff --git a/crates/red_knot_project/resources/test/corpus/59_async_with_nested_with.py b/crates/ty_project/resources/test/corpus/59_async_with_nested_with.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/59_async_with_nested_with.py rename to crates/ty_project/resources/test/corpus/59_async_with_nested_with.py diff --git a/crates/red_knot_project/resources/test/corpus/60_try_except.py b/crates/ty_project/resources/test/corpus/60_try_except.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/60_try_except.py rename to crates/ty_project/resources/test/corpus/60_try_except.py diff --git a/crates/red_knot_project/resources/test/corpus/60_try_except2.py b/crates/ty_project/resources/test/corpus/60_try_except2.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/60_try_except2.py rename to crates/ty_project/resources/test/corpus/60_try_except2.py diff --git a/crates/red_knot_project/resources/test/corpus/60_try_except_bare.py b/crates/ty_project/resources/test/corpus/60_try_except_bare.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/60_try_except_bare.py rename to crates/ty_project/resources/test/corpus/60_try_except_bare.py diff --git a/crates/red_knot_project/resources/test/corpus/60_try_finally.py b/crates/ty_project/resources/test/corpus/60_try_finally.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/60_try_finally.py rename to crates/ty_project/resources/test/corpus/60_try_finally.py diff --git a/crates/red_knot_project/resources/test/corpus/60_try_finally_codeobj.py b/crates/ty_project/resources/test/corpus/60_try_finally_codeobj.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/60_try_finally_codeobj.py rename to crates/ty_project/resources/test/corpus/60_try_finally_codeobj.py diff --git a/crates/red_knot_project/resources/test/corpus/60_try_finally_cond.py b/crates/ty_project/resources/test/corpus/60_try_finally_cond.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/60_try_finally_cond.py rename to crates/ty_project/resources/test/corpus/60_try_finally_cond.py diff --git a/crates/red_knot_project/resources/test/corpus/60_try_finally_for.py b/crates/ty_project/resources/test/corpus/60_try_finally_for.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/60_try_finally_for.py rename to crates/ty_project/resources/test/corpus/60_try_finally_for.py diff --git a/crates/red_knot_project/resources/test/corpus/60_try_finally_ret.py b/crates/ty_project/resources/test/corpus/60_try_finally_ret.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/60_try_finally_ret.py rename to crates/ty_project/resources/test/corpus/60_try_finally_ret.py diff --git a/crates/red_knot_project/resources/test/corpus/61_try_except_finally.py b/crates/ty_project/resources/test/corpus/61_try_except_finally.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/61_try_except_finally.py rename to crates/ty_project/resources/test/corpus/61_try_except_finally.py diff --git a/crates/red_knot_project/resources/test/corpus/62_try_except_as.py b/crates/ty_project/resources/test/corpus/62_try_except_as.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/62_try_except_as.py rename to crates/ty_project/resources/test/corpus/62_try_except_as.py diff --git a/crates/red_knot_project/resources/test/corpus/62_try_except_break.py b/crates/ty_project/resources/test/corpus/62_try_except_break.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/62_try_except_break.py rename to crates/ty_project/resources/test/corpus/62_try_except_break.py diff --git a/crates/red_knot_project/resources/test/corpus/62_try_except_cond.py b/crates/ty_project/resources/test/corpus/62_try_except_cond.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/62_try_except_cond.py rename to crates/ty_project/resources/test/corpus/62_try_except_cond.py diff --git a/crates/red_knot_project/resources/test/corpus/62_try_except_double_nested_inside_if_else.py b/crates/ty_project/resources/test/corpus/62_try_except_double_nested_inside_if_else.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/62_try_except_double_nested_inside_if_else.py rename to crates/ty_project/resources/test/corpus/62_try_except_double_nested_inside_if_else.py diff --git a/crates/red_knot_project/resources/test/corpus/62_try_except_return.py b/crates/ty_project/resources/test/corpus/62_try_except_return.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/62_try_except_return.py rename to crates/ty_project/resources/test/corpus/62_try_except_return.py diff --git a/crates/red_knot_project/resources/test/corpus/63_raise.py b/crates/ty_project/resources/test/corpus/63_raise.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/63_raise.py rename to crates/ty_project/resources/test/corpus/63_raise.py diff --git a/crates/red_knot_project/resources/test/corpus/63_raise_func.py b/crates/ty_project/resources/test/corpus/63_raise_func.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/63_raise_func.py rename to crates/ty_project/resources/test/corpus/63_raise_func.py diff --git a/crates/red_knot_project/resources/test/corpus/63_raise_x.py b/crates/ty_project/resources/test/corpus/63_raise_x.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/63_raise_x.py rename to crates/ty_project/resources/test/corpus/63_raise_x.py diff --git a/crates/red_knot_project/resources/test/corpus/63_raise_x_from_y.py b/crates/ty_project/resources/test/corpus/63_raise_x_from_y.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/63_raise_x_from_y.py rename to crates/ty_project/resources/test/corpus/63_raise_x_from_y.py diff --git a/crates/red_knot_project/resources/test/corpus/64_assert.py b/crates/ty_project/resources/test/corpus/64_assert.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/64_assert.py rename to crates/ty_project/resources/test/corpus/64_assert.py diff --git a/crates/red_knot_project/resources/test/corpus/67_with.py b/crates/ty_project/resources/test/corpus/67_with.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/67_with.py rename to crates/ty_project/resources/test/corpus/67_with.py diff --git a/crates/red_knot_project/resources/test/corpus/67_with_as.py b/crates/ty_project/resources/test/corpus/67_with_as.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/67_with_as.py rename to crates/ty_project/resources/test/corpus/67_with_as.py diff --git a/crates/red_knot_project/resources/test/corpus/67_with_as_func.py b/crates/ty_project/resources/test/corpus/67_with_as_func.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/67_with_as_func.py rename to crates/ty_project/resources/test/corpus/67_with_as_func.py diff --git a/crates/red_knot_project/resources/test/corpus/67_with_cond_return.py b/crates/ty_project/resources/test/corpus/67_with_cond_return.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/67_with_cond_return.py rename to crates/ty_project/resources/test/corpus/67_with_cond_return.py diff --git a/crates/red_knot_project/resources/test/corpus/67_with_inside_try_finally_multiple_terminal_elif.py b/crates/ty_project/resources/test/corpus/67_with_inside_try_finally_multiple_terminal_elif.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/67_with_inside_try_finally_multiple_terminal_elif.py rename to crates/ty_project/resources/test/corpus/67_with_inside_try_finally_multiple_terminal_elif.py diff --git a/crates/red_knot_project/resources/test/corpus/67_with_inside_try_finally_preceding_terminal_except.py b/crates/ty_project/resources/test/corpus/67_with_inside_try_finally_preceding_terminal_except.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/67_with_inside_try_finally_preceding_terminal_except.py rename to crates/ty_project/resources/test/corpus/67_with_inside_try_finally_preceding_terminal_except.py diff --git a/crates/red_knot_project/resources/test/corpus/67_with_multi_exit.py b/crates/ty_project/resources/test/corpus/67_with_multi_exit.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/67_with_multi_exit.py rename to crates/ty_project/resources/test/corpus/67_with_multi_exit.py diff --git a/crates/red_knot_project/resources/test/corpus/67_with_non_name_target.py b/crates/ty_project/resources/test/corpus/67_with_non_name_target.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/67_with_non_name_target.py rename to crates/ty_project/resources/test/corpus/67_with_non_name_target.py diff --git a/crates/red_knot_project/resources/test/corpus/67_with_return.py b/crates/ty_project/resources/test/corpus/67_with_return.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/67_with_return.py rename to crates/ty_project/resources/test/corpus/67_with_return.py diff --git a/crates/red_knot_project/resources/test/corpus/68_with2.py b/crates/ty_project/resources/test/corpus/68_with2.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/68_with2.py rename to crates/ty_project/resources/test/corpus/68_with2.py diff --git a/crates/red_knot_project/resources/test/corpus/69_for_try_except_continue1.py b/crates/ty_project/resources/test/corpus/69_for_try_except_continue1.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/69_for_try_except_continue1.py rename to crates/ty_project/resources/test/corpus/69_for_try_except_continue1.py diff --git a/crates/red_knot_project/resources/test/corpus/69_for_try_except_continue2.py b/crates/ty_project/resources/test/corpus/69_for_try_except_continue2.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/69_for_try_except_continue2.py rename to crates/ty_project/resources/test/corpus/69_for_try_except_continue2.py diff --git a/crates/red_knot_project/resources/test/corpus/69_for_try_except_continue3.py b/crates/ty_project/resources/test/corpus/69_for_try_except_continue3.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/69_for_try_except_continue3.py rename to crates/ty_project/resources/test/corpus/69_for_try_except_continue3.py diff --git a/crates/red_knot_project/resources/test/corpus/70_class.py b/crates/ty_project/resources/test/corpus/70_class.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/70_class.py rename to crates/ty_project/resources/test/corpus/70_class.py diff --git a/crates/red_knot_project/resources/test/corpus/70_class_base.py b/crates/ty_project/resources/test/corpus/70_class_base.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/70_class_base.py rename to crates/ty_project/resources/test/corpus/70_class_base.py diff --git a/crates/red_knot_project/resources/test/corpus/70_class_doc_str.py b/crates/ty_project/resources/test/corpus/70_class_doc_str.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/70_class_doc_str.py rename to crates/ty_project/resources/test/corpus/70_class_doc_str.py diff --git a/crates/red_knot_project/resources/test/corpus/71_class_meth.py b/crates/ty_project/resources/test/corpus/71_class_meth.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/71_class_meth.py rename to crates/ty_project/resources/test/corpus/71_class_meth.py diff --git a/crates/red_knot_project/resources/test/corpus/71_class_var.py b/crates/ty_project/resources/test/corpus/71_class_var.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/71_class_var.py rename to crates/ty_project/resources/test/corpus/71_class_var.py diff --git a/crates/red_knot_project/resources/test/corpus/72_class_mix.py b/crates/ty_project/resources/test/corpus/72_class_mix.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/72_class_mix.py rename to crates/ty_project/resources/test/corpus/72_class_mix.py diff --git a/crates/red_knot_project/resources/test/corpus/73_class_generic.py b/crates/ty_project/resources/test/corpus/73_class_generic.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/73_class_generic.py rename to crates/ty_project/resources/test/corpus/73_class_generic.py diff --git a/crates/red_knot_project/resources/test/corpus/73_class_generic_bounds.py b/crates/ty_project/resources/test/corpus/73_class_generic_bounds.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/73_class_generic_bounds.py rename to crates/ty_project/resources/test/corpus/73_class_generic_bounds.py diff --git a/crates/red_knot_project/resources/test/corpus/73_class_generic_constraints.py b/crates/ty_project/resources/test/corpus/73_class_generic_constraints.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/73_class_generic_constraints.py rename to crates/ty_project/resources/test/corpus/73_class_generic_constraints.py diff --git a/crates/red_knot_project/resources/test/corpus/73_class_generic_defaults.py b/crates/ty_project/resources/test/corpus/73_class_generic_defaults.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/73_class_generic_defaults.py rename to crates/ty_project/resources/test/corpus/73_class_generic_defaults.py diff --git a/crates/red_knot_project/resources/test/corpus/73_class_generic_paramspec.py b/crates/ty_project/resources/test/corpus/73_class_generic_paramspec.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/73_class_generic_paramspec.py rename to crates/ty_project/resources/test/corpus/73_class_generic_paramspec.py diff --git a/crates/red_knot_project/resources/test/corpus/73_class_generic_paramspec_default.py b/crates/ty_project/resources/test/corpus/73_class_generic_paramspec_default.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/73_class_generic_paramspec_default.py rename to crates/ty_project/resources/test/corpus/73_class_generic_paramspec_default.py diff --git a/crates/red_knot_project/resources/test/corpus/73_class_generic_tuple.py b/crates/ty_project/resources/test/corpus/73_class_generic_tuple.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/73_class_generic_tuple.py rename to crates/ty_project/resources/test/corpus/73_class_generic_tuple.py diff --git a/crates/red_knot_project/resources/test/corpus/73_class_generic_tuple_default.py b/crates/ty_project/resources/test/corpus/73_class_generic_tuple_default.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/73_class_generic_tuple_default.py rename to crates/ty_project/resources/test/corpus/73_class_generic_tuple_default.py diff --git a/crates/red_knot_project/resources/test/corpus/74_class_kwargs.py b/crates/ty_project/resources/test/corpus/74_class_kwargs.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/74_class_kwargs.py rename to crates/ty_project/resources/test/corpus/74_class_kwargs.py diff --git a/crates/red_knot_project/resources/test/corpus/74_class_kwargs_2.py b/crates/ty_project/resources/test/corpus/74_class_kwargs_2.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/74_class_kwargs_2.py rename to crates/ty_project/resources/test/corpus/74_class_kwargs_2.py diff --git a/crates/red_knot_project/resources/test/corpus/74_class_super.py b/crates/ty_project/resources/test/corpus/74_class_super.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/74_class_super.py rename to crates/ty_project/resources/test/corpus/74_class_super.py diff --git a/crates/red_knot_project/resources/test/corpus/74_class_super_nested.py b/crates/ty_project/resources/test/corpus/74_class_super_nested.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/74_class_super_nested.py rename to crates/ty_project/resources/test/corpus/74_class_super_nested.py diff --git a/crates/red_knot_project/resources/test/corpus/74_just_super.py b/crates/ty_project/resources/test/corpus/74_just_super.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/74_just_super.py rename to crates/ty_project/resources/test/corpus/74_just_super.py diff --git a/crates/red_knot_project/resources/test/corpus/75_classderef.py b/crates/ty_project/resources/test/corpus/75_classderef.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/75_classderef.py rename to crates/ty_project/resources/test/corpus/75_classderef.py diff --git a/crates/red_knot_project/resources/test/corpus/75_classderef_no.py b/crates/ty_project/resources/test/corpus/75_classderef_no.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/75_classderef_no.py rename to crates/ty_project/resources/test/corpus/75_classderef_no.py diff --git a/crates/red_knot_project/resources/test/corpus/76_class_nonlocal1.py b/crates/ty_project/resources/test/corpus/76_class_nonlocal1.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/76_class_nonlocal1.py rename to crates/ty_project/resources/test/corpus/76_class_nonlocal1.py diff --git a/crates/red_knot_project/resources/test/corpus/76_class_nonlocal2.py b/crates/ty_project/resources/test/corpus/76_class_nonlocal2.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/76_class_nonlocal2.py rename to crates/ty_project/resources/test/corpus/76_class_nonlocal2.py diff --git a/crates/red_knot_project/resources/test/corpus/76_class_nonlocal3.py b/crates/ty_project/resources/test/corpus/76_class_nonlocal3.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/76_class_nonlocal3.py rename to crates/ty_project/resources/test/corpus/76_class_nonlocal3.py diff --git a/crates/red_knot_project/resources/test/corpus/76_class_nonlocal4.py b/crates/ty_project/resources/test/corpus/76_class_nonlocal4.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/76_class_nonlocal4.py rename to crates/ty_project/resources/test/corpus/76_class_nonlocal4.py diff --git a/crates/red_knot_project/resources/test/corpus/76_class_nonlocal5.py b/crates/ty_project/resources/test/corpus/76_class_nonlocal5.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/76_class_nonlocal5.py rename to crates/ty_project/resources/test/corpus/76_class_nonlocal5.py diff --git a/crates/red_knot_project/resources/test/corpus/77_class__class__.py b/crates/ty_project/resources/test/corpus/77_class__class__.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/77_class__class__.py rename to crates/ty_project/resources/test/corpus/77_class__class__.py diff --git a/crates/red_knot_project/resources/test/corpus/77_class__class__nested.py b/crates/ty_project/resources/test/corpus/77_class__class__nested.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/77_class__class__nested.py rename to crates/ty_project/resources/test/corpus/77_class__class__nested.py diff --git a/crates/red_knot_project/resources/test/corpus/77_class__class__no_class.py b/crates/ty_project/resources/test/corpus/77_class__class__no_class.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/77_class__class__no_class.py rename to crates/ty_project/resources/test/corpus/77_class__class__no_class.py diff --git a/crates/red_knot_project/resources/test/corpus/77_class__class__nonlocals.py b/crates/ty_project/resources/test/corpus/77_class__class__nonlocals.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/77_class__class__nonlocals.py rename to crates/ty_project/resources/test/corpus/77_class__class__nonlocals.py diff --git a/crates/red_knot_project/resources/test/corpus/77_class__class__nonlocals_2.py b/crates/ty_project/resources/test/corpus/77_class__class__nonlocals_2.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/77_class__class__nonlocals_2.py rename to crates/ty_project/resources/test/corpus/77_class__class__nonlocals_2.py diff --git a/crates/red_knot_project/resources/test/corpus/77_class__class__param.py b/crates/ty_project/resources/test/corpus/77_class__class__param.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/77_class__class__param.py rename to crates/ty_project/resources/test/corpus/77_class__class__param.py diff --git a/crates/red_knot_project/resources/test/corpus/77_class__class__param_lambda.py b/crates/ty_project/resources/test/corpus/77_class__class__param_lambda.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/77_class__class__param_lambda.py rename to crates/ty_project/resources/test/corpus/77_class__class__param_lambda.py diff --git a/crates/red_knot_project/resources/test/corpus/78_class_body_cond.py b/crates/ty_project/resources/test/corpus/78_class_body_cond.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/78_class_body_cond.py rename to crates/ty_project/resources/test/corpus/78_class_body_cond.py diff --git a/crates/red_knot_project/resources/test/corpus/78_class_dec.py b/crates/ty_project/resources/test/corpus/78_class_dec.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/78_class_dec.py rename to crates/ty_project/resources/test/corpus/78_class_dec.py diff --git a/crates/red_knot_project/resources/test/corpus/78_class_dec_member.py b/crates/ty_project/resources/test/corpus/78_class_dec_member.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/78_class_dec_member.py rename to crates/ty_project/resources/test/corpus/78_class_dec_member.py diff --git a/crates/red_knot_project/resources/test/corpus/78_class_dec_member_func.py b/crates/ty_project/resources/test/corpus/78_class_dec_member_func.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/78_class_dec_member_func.py rename to crates/ty_project/resources/test/corpus/78_class_dec_member_func.py diff --git a/crates/red_knot_project/resources/test/corpus/79_metaclass.py b/crates/ty_project/resources/test/corpus/79_metaclass.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/79_metaclass.py rename to crates/ty_project/resources/test/corpus/79_metaclass.py diff --git a/crates/red_knot_project/resources/test/corpus/80_func_kwonlyargs1.py b/crates/ty_project/resources/test/corpus/80_func_kwonlyargs1.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/80_func_kwonlyargs1.py rename to crates/ty_project/resources/test/corpus/80_func_kwonlyargs1.py diff --git a/crates/red_knot_project/resources/test/corpus/80_func_kwonlyargs2.py b/crates/ty_project/resources/test/corpus/80_func_kwonlyargs2.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/80_func_kwonlyargs2.py rename to crates/ty_project/resources/test/corpus/80_func_kwonlyargs2.py diff --git a/crates/red_knot_project/resources/test/corpus/80_func_kwonlyargs3.py b/crates/ty_project/resources/test/corpus/80_func_kwonlyargs3.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/80_func_kwonlyargs3.py rename to crates/ty_project/resources/test/corpus/80_func_kwonlyargs3.py diff --git a/crates/red_knot_project/resources/test/corpus/81_func_kwonlyargs_defaults.py b/crates/ty_project/resources/test/corpus/81_func_kwonlyargs_defaults.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/81_func_kwonlyargs_defaults.py rename to crates/ty_project/resources/test/corpus/81_func_kwonlyargs_defaults.py diff --git a/crates/red_knot_project/resources/test/corpus/83_jupyter_notebook_ipython_magic.ipynb b/crates/ty_project/resources/test/corpus/83_jupyter_notebook_ipython_magic.ipynb similarity index 100% rename from crates/red_knot_project/resources/test/corpus/83_jupyter_notebook_ipython_magic.ipynb rename to crates/ty_project/resources/test/corpus/83_jupyter_notebook_ipython_magic.ipynb diff --git a/crates/red_knot_project/resources/test/corpus/85_match.py b/crates/ty_project/resources/test/corpus/85_match.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/85_match.py rename to crates/ty_project/resources/test/corpus/85_match.py diff --git a/crates/red_knot_project/resources/test/corpus/85_match_as.py b/crates/ty_project/resources/test/corpus/85_match_as.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/85_match_as.py rename to crates/ty_project/resources/test/corpus/85_match_as.py diff --git a/crates/red_knot_project/resources/test/corpus/85_match_attr.py b/crates/ty_project/resources/test/corpus/85_match_attr.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/85_match_attr.py rename to crates/ty_project/resources/test/corpus/85_match_attr.py diff --git a/crates/red_knot_project/resources/test/corpus/85_match_class.py b/crates/ty_project/resources/test/corpus/85_match_class.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/85_match_class.py rename to crates/ty_project/resources/test/corpus/85_match_class.py diff --git a/crates/red_knot_project/resources/test/corpus/85_match_default.py b/crates/ty_project/resources/test/corpus/85_match_default.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/85_match_default.py rename to crates/ty_project/resources/test/corpus/85_match_default.py diff --git a/crates/red_knot_project/resources/test/corpus/85_match_guard.py b/crates/ty_project/resources/test/corpus/85_match_guard.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/85_match_guard.py rename to crates/ty_project/resources/test/corpus/85_match_guard.py diff --git a/crates/red_knot_project/resources/test/corpus/85_match_guard_with_named_expr.py b/crates/ty_project/resources/test/corpus/85_match_guard_with_named_expr.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/85_match_guard_with_named_expr.py rename to crates/ty_project/resources/test/corpus/85_match_guard_with_named_expr.py diff --git a/crates/red_knot_project/resources/test/corpus/85_match_in_func.py b/crates/ty_project/resources/test/corpus/85_match_in_func.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/85_match_in_func.py rename to crates/ty_project/resources/test/corpus/85_match_in_func.py diff --git a/crates/red_knot_project/resources/test/corpus/85_match_in_func_with_rest.py b/crates/ty_project/resources/test/corpus/85_match_in_func_with_rest.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/85_match_in_func_with_rest.py rename to crates/ty_project/resources/test/corpus/85_match_in_func_with_rest.py diff --git a/crates/red_knot_project/resources/test/corpus/85_match_in_func_with_star.py b/crates/ty_project/resources/test/corpus/85_match_in_func_with_star.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/85_match_in_func_with_star.py rename to crates/ty_project/resources/test/corpus/85_match_in_func_with_star.py diff --git a/crates/red_knot_project/resources/test/corpus/85_match_invalid.py b/crates/ty_project/resources/test/corpus/85_match_invalid.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/85_match_invalid.py rename to crates/ty_project/resources/test/corpus/85_match_invalid.py diff --git a/crates/red_knot_project/resources/test/corpus/85_match_mapping.py b/crates/ty_project/resources/test/corpus/85_match_mapping.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/85_match_mapping.py rename to crates/ty_project/resources/test/corpus/85_match_mapping.py diff --git a/crates/red_knot_project/resources/test/corpus/85_match_mapping_subpattern.py b/crates/ty_project/resources/test/corpus/85_match_mapping_subpattern.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/85_match_mapping_subpattern.py rename to crates/ty_project/resources/test/corpus/85_match_mapping_subpattern.py diff --git a/crates/red_knot_project/resources/test/corpus/85_match_or.py b/crates/ty_project/resources/test/corpus/85_match_or.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/85_match_or.py rename to crates/ty_project/resources/test/corpus/85_match_or.py diff --git a/crates/red_knot_project/resources/test/corpus/85_match_sequence.py b/crates/ty_project/resources/test/corpus/85_match_sequence.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/85_match_sequence.py rename to crates/ty_project/resources/test/corpus/85_match_sequence.py diff --git a/crates/red_knot_project/resources/test/corpus/85_match_sequence_wildcard.py b/crates/ty_project/resources/test/corpus/85_match_sequence_wildcard.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/85_match_sequence_wildcard.py rename to crates/ty_project/resources/test/corpus/85_match_sequence_wildcard.py diff --git a/crates/red_knot_project/resources/test/corpus/85_match_singleton.py b/crates/ty_project/resources/test/corpus/85_match_singleton.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/85_match_singleton.py rename to crates/ty_project/resources/test/corpus/85_match_singleton.py diff --git a/crates/red_knot_project/resources/test/corpus/88_regression_generic_method_with_nested_function.py b/crates/ty_project/resources/test/corpus/88_regression_generic_method_with_nested_function.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/88_regression_generic_method_with_nested_function.py rename to crates/ty_project/resources/test/corpus/88_regression_generic_method_with_nested_function.py diff --git a/crates/red_knot_project/resources/test/corpus/88_regression_tuple_type_short_circuit.py b/crates/ty_project/resources/test/corpus/88_regression_tuple_type_short_circuit.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/88_regression_tuple_type_short_circuit.py rename to crates/ty_project/resources/test/corpus/88_regression_tuple_type_short_circuit.py diff --git a/crates/red_knot_project/resources/test/corpus/89_type_alias.py b/crates/ty_project/resources/test/corpus/89_type_alias.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/89_type_alias.py rename to crates/ty_project/resources/test/corpus/89_type_alias.py diff --git a/crates/red_knot_project/resources/test/corpus/89_type_alias_invalid_bound.py b/crates/ty_project/resources/test/corpus/89_type_alias_invalid_bound.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/89_type_alias_invalid_bound.py rename to crates/ty_project/resources/test/corpus/89_type_alias_invalid_bound.py diff --git a/crates/red_knot_project/resources/test/corpus/90_docstring_class.py b/crates/ty_project/resources/test/corpus/90_docstring_class.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/90_docstring_class.py rename to crates/ty_project/resources/test/corpus/90_docstring_class.py diff --git a/crates/red_knot_project/resources/test/corpus/90_docstring_func.py b/crates/ty_project/resources/test/corpus/90_docstring_func.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/90_docstring_func.py rename to crates/ty_project/resources/test/corpus/90_docstring_func.py diff --git a/crates/red_knot_project/resources/test/corpus/90_docstring_mod.py b/crates/ty_project/resources/test/corpus/90_docstring_mod.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/90_docstring_mod.py rename to crates/ty_project/resources/test/corpus/90_docstring_mod.py diff --git a/crates/red_knot_project/resources/test/corpus/91_line_numbers1.py b/crates/ty_project/resources/test/corpus/91_line_numbers1.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/91_line_numbers1.py rename to crates/ty_project/resources/test/corpus/91_line_numbers1.py diff --git a/crates/red_knot_project/resources/test/corpus/91_line_numbers2.py b/crates/ty_project/resources/test/corpus/91_line_numbers2.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/91_line_numbers2.py rename to crates/ty_project/resources/test/corpus/91_line_numbers2.py diff --git a/crates/red_knot_project/resources/test/corpus/91_line_numbers2_comp.py b/crates/ty_project/resources/test/corpus/91_line_numbers2_comp.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/91_line_numbers2_comp.py rename to crates/ty_project/resources/test/corpus/91_line_numbers2_comp.py diff --git a/crates/red_knot_project/resources/test/corpus/91_line_numbers3.py b/crates/ty_project/resources/test/corpus/91_line_numbers3.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/91_line_numbers3.py rename to crates/ty_project/resources/test/corpus/91_line_numbers3.py diff --git a/crates/red_knot_project/resources/test/corpus/91_line_numbers4.py b/crates/ty_project/resources/test/corpus/91_line_numbers4.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/91_line_numbers4.py rename to crates/ty_project/resources/test/corpus/91_line_numbers4.py diff --git a/crates/red_knot_project/resources/test/corpus/91_line_numbers_dict.py b/crates/ty_project/resources/test/corpus/91_line_numbers_dict.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/91_line_numbers_dict.py rename to crates/ty_project/resources/test/corpus/91_line_numbers_dict.py diff --git a/crates/red_knot_project/resources/test/corpus/91_line_numbers_dict_comp.py b/crates/ty_project/resources/test/corpus/91_line_numbers_dict_comp.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/91_line_numbers_dict_comp.py rename to crates/ty_project/resources/test/corpus/91_line_numbers_dict_comp.py diff --git a/crates/red_knot_project/resources/test/corpus/92_qual_class_in_class.py b/crates/ty_project/resources/test/corpus/92_qual_class_in_class.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/92_qual_class_in_class.py rename to crates/ty_project/resources/test/corpus/92_qual_class_in_class.py diff --git a/crates/red_knot_project/resources/test/corpus/92_qual_class_in_func.py b/crates/ty_project/resources/test/corpus/92_qual_class_in_func.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/92_qual_class_in_func.py rename to crates/ty_project/resources/test/corpus/92_qual_class_in_func.py diff --git a/crates/red_knot_project/resources/test/corpus/93_deadcode.py b/crates/ty_project/resources/test/corpus/93_deadcode.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/93_deadcode.py rename to crates/ty_project/resources/test/corpus/93_deadcode.py diff --git a/crates/red_knot_project/resources/test/corpus/94_strformat.py b/crates/ty_project/resources/test/corpus/94_strformat.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/94_strformat.py rename to crates/ty_project/resources/test/corpus/94_strformat.py diff --git a/crates/red_knot_project/resources/test/corpus/94_strformat_complex.py b/crates/ty_project/resources/test/corpus/94_strformat_complex.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/94_strformat_complex.py rename to crates/ty_project/resources/test/corpus/94_strformat_complex.py diff --git a/crates/red_knot_project/resources/test/corpus/94_strformat_conv.py b/crates/ty_project/resources/test/corpus/94_strformat_conv.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/94_strformat_conv.py rename to crates/ty_project/resources/test/corpus/94_strformat_conv.py diff --git a/crates/red_knot_project/resources/test/corpus/94_strformat_conversion.py b/crates/ty_project/resources/test/corpus/94_strformat_conversion.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/94_strformat_conversion.py rename to crates/ty_project/resources/test/corpus/94_strformat_conversion.py diff --git a/crates/red_knot_project/resources/test/corpus/94_strformat_spec.py b/crates/ty_project/resources/test/corpus/94_strformat_spec.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/94_strformat_spec.py rename to crates/ty_project/resources/test/corpus/94_strformat_spec.py diff --git a/crates/red_knot_project/resources/test/corpus/95_annotation_assign_subscript_no_rhs.py b/crates/ty_project/resources/test/corpus/95_annotation_assign_subscript_no_rhs.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/95_annotation_assign_subscript_no_rhs.py rename to crates/ty_project/resources/test/corpus/95_annotation_assign_subscript_no_rhs.py diff --git a/crates/red_knot_project/resources/test/corpus/95_annotation_assign_tuple.py b/crates/ty_project/resources/test/corpus/95_annotation_assign_tuple.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/95_annotation_assign_tuple.py rename to crates/ty_project/resources/test/corpus/95_annotation_assign_tuple.py diff --git a/crates/red_knot_project/resources/test/corpus/95_annotation_class.py b/crates/ty_project/resources/test/corpus/95_annotation_class.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/95_annotation_class.py rename to crates/ty_project/resources/test/corpus/95_annotation_class.py diff --git a/crates/red_knot_project/resources/test/corpus/95_annotation_class_multiline.py b/crates/ty_project/resources/test/corpus/95_annotation_class_multiline.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/95_annotation_class_multiline.py rename to crates/ty_project/resources/test/corpus/95_annotation_class_multiline.py diff --git a/crates/red_knot_project/resources/test/corpus/95_annotation_class_no_value.py b/crates/ty_project/resources/test/corpus/95_annotation_class_no_value.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/95_annotation_class_no_value.py rename to crates/ty_project/resources/test/corpus/95_annotation_class_no_value.py diff --git a/crates/red_knot_project/resources/test/corpus/95_annotation_fstring_invalid.py b/crates/ty_project/resources/test/corpus/95_annotation_fstring_invalid.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/95_annotation_fstring_invalid.py rename to crates/ty_project/resources/test/corpus/95_annotation_fstring_invalid.py diff --git a/crates/red_knot_project/resources/test/corpus/95_annotation_func.py b/crates/ty_project/resources/test/corpus/95_annotation_func.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/95_annotation_func.py rename to crates/ty_project/resources/test/corpus/95_annotation_func.py diff --git a/crates/red_knot_project/resources/test/corpus/95_annotation_func_future.py b/crates/ty_project/resources/test/corpus/95_annotation_func_future.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/95_annotation_func_future.py rename to crates/ty_project/resources/test/corpus/95_annotation_func_future.py diff --git a/crates/red_knot_project/resources/test/corpus/95_annotation_global.py b/crates/ty_project/resources/test/corpus/95_annotation_global.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/95_annotation_global.py rename to crates/ty_project/resources/test/corpus/95_annotation_global.py diff --git a/crates/red_knot_project/resources/test/corpus/95_annotation_global_simple.py b/crates/ty_project/resources/test/corpus/95_annotation_global_simple.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/95_annotation_global_simple.py rename to crates/ty_project/resources/test/corpus/95_annotation_global_simple.py diff --git a/crates/red_knot_project/resources/test/corpus/95_annotation_local_attr.py b/crates/ty_project/resources/test/corpus/95_annotation_local_attr.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/95_annotation_local_attr.py rename to crates/ty_project/resources/test/corpus/95_annotation_local_attr.py diff --git a/crates/red_knot_project/resources/test/corpus/95_annotation_module.py b/crates/ty_project/resources/test/corpus/95_annotation_module.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/95_annotation_module.py rename to crates/ty_project/resources/test/corpus/95_annotation_module.py diff --git a/crates/red_knot_project/resources/test/corpus/95_annotation_string_tuple.py b/crates/ty_project/resources/test/corpus/95_annotation_string_tuple.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/95_annotation_string_tuple.py rename to crates/ty_project/resources/test/corpus/95_annotation_string_tuple.py diff --git a/crates/red_knot_project/resources/test/corpus/95_annotation_union.py b/crates/ty_project/resources/test/corpus/95_annotation_union.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/95_annotation_union.py rename to crates/ty_project/resources/test/corpus/95_annotation_union.py diff --git a/crates/red_knot_project/resources/test/corpus/96_debug.py b/crates/ty_project/resources/test/corpus/96_debug.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/96_debug.py rename to crates/ty_project/resources/test/corpus/96_debug.py diff --git a/crates/red_knot_project/resources/test/corpus/97_global_nonlocal_store.py b/crates/ty_project/resources/test/corpus/97_global_nonlocal_store.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/97_global_nonlocal_store.py rename to crates/ty_project/resources/test/corpus/97_global_nonlocal_store.py diff --git a/crates/red_knot_project/resources/test/corpus/98_ann_assign_annotation_future_annotations.py b/crates/ty_project/resources/test/corpus/98_ann_assign_annotation_future_annotations.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/98_ann_assign_annotation_future_annotations.py rename to crates/ty_project/resources/test/corpus/98_ann_assign_annotation_future_annotations.py diff --git a/crates/red_knot_project/resources/test/corpus/98_ann_assign_annotation_wrong_future.py b/crates/ty_project/resources/test/corpus/98_ann_assign_annotation_wrong_future.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/98_ann_assign_annotation_wrong_future.py rename to crates/ty_project/resources/test/corpus/98_ann_assign_annotation_wrong_future.py diff --git a/crates/red_knot_project/resources/test/corpus/98_ann_assign_invalid_target.py b/crates/ty_project/resources/test/corpus/98_ann_assign_invalid_target.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/98_ann_assign_invalid_target.py rename to crates/ty_project/resources/test/corpus/98_ann_assign_invalid_target.py diff --git a/crates/red_knot_project/resources/test/corpus/98_ann_assign_simple_annotation.py b/crates/ty_project/resources/test/corpus/98_ann_assign_simple_annotation.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/98_ann_assign_simple_annotation.py rename to crates/ty_project/resources/test/corpus/98_ann_assign_simple_annotation.py diff --git a/crates/red_knot_project/resources/test/corpus/99_empty_jump_target_insts.py b/crates/ty_project/resources/test/corpus/99_empty_jump_target_insts.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/99_empty_jump_target_insts.py rename to crates/ty_project/resources/test/corpus/99_empty_jump_target_insts.py diff --git a/crates/red_knot_project/resources/test/corpus/cycle_narrowing_constraints.py b/crates/ty_project/resources/test/corpus/cycle_narrowing_constraints.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/cycle_narrowing_constraints.py rename to crates/ty_project/resources/test/corpus/cycle_narrowing_constraints.py diff --git a/crates/red_knot_project/resources/test/corpus/cycle_negative_narrowing_constraints.py b/crates/ty_project/resources/test/corpus/cycle_negative_narrowing_constraints.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/cycle_negative_narrowing_constraints.py rename to crates/ty_project/resources/test/corpus/cycle_negative_narrowing_constraints.py diff --git a/crates/red_knot_project/resources/test/corpus/self_referential_function_annotation.py b/crates/ty_project/resources/test/corpus/self_referential_function_annotation.py similarity index 100% rename from crates/red_knot_project/resources/test/corpus/self_referential_function_annotation.py rename to crates/ty_project/resources/test/corpus/self_referential_function_annotation.py diff --git a/crates/red_knot_project/src/combine.rs b/crates/ty_project/src/combine.rs similarity index 97% rename from crates/red_knot_project/src/combine.rs rename to crates/ty_project/src/combine.rs index 659c23df5c..69d6eae9db 100644 --- a/crates/red_knot_project/src/combine.rs +++ b/crates/ty_project/src/combine.rs @@ -1,8 +1,8 @@ use std::{collections::HashMap, hash::BuildHasher}; -use red_knot_python_semantic::{PythonPath, PythonPlatform}; use ruff_db::system::SystemPathBuf; use ruff_python_ast::PythonVersion; +use ty_python_semantic::{PythonPath, PythonPlatform}; /// Combine two values, preferring the values in `self`. /// @@ -22,7 +22,7 @@ use ruff_python_ast::PythonVersion; /// For example: patterns coming last in file inclusion and exclusion patterns /// allow overriding earlier patterns, matching the `gitignore` behavior. /// Generally speaking, it feels more intuitive if later values override earlier values -/// than the other way around: `knot --exclude png --exclude "!important.png"`. +/// than the other way around: `ty --exclude png --exclude "!important.png"`. /// /// The main downside of this approach is that the ordering can be surprising in cases /// where the option has a "first match" semantic and not a "last match" wins. @@ -35,7 +35,7 @@ use ruff_python_ast::PythonVersion; /// ``` /// /// ```bash -/// knot --extra-paths a +/// ty --extra-paths a /// ``` /// /// That's why a user might expect that this configuration results in `["a", "b", "c"]`, diff --git a/crates/red_knot_project/src/db.rs b/crates/ty_project/src/db.rs similarity index 95% rename from crates/red_knot_project/src/db.rs rename to crates/ty_project/src/db.rs index d724ebc3f3..71b473bd33 100644 --- a/crates/red_knot_project/src/db.rs +++ b/crates/ty_project/src/db.rs @@ -3,9 +3,6 @@ use std::sync::Arc; use crate::DEFAULT_LINT_REGISTRY; use crate::{Project, ProjectMetadata}; -use red_knot_ide::Db as IdeDb; -use red_knot_python_semantic::lint::{LintRegistry, RuleSelection}; -use red_knot_python_semantic::{Db as SemanticDb, Program}; use ruff_db::diagnostic::Diagnostic; use ruff_db::files::{File, Files}; use ruff_db::system::System; @@ -13,6 +10,9 @@ use ruff_db::vendored::VendoredFileSystem; use ruff_db::{Db as SourceDb, Upcast}; use salsa::plumbing::ZalsaDatabase; use salsa::{Cancelled, Event}; +use ty_ide::Db as IdeDb; +use ty_python_semantic::lint::{LintRegistry, RuleSelection}; +use ty_python_semantic::{Db as SemanticDb, Program}; mod changes; @@ -139,7 +139,7 @@ impl SemanticDb for ProjectDatabase { #[salsa::db] impl SourceDb for ProjectDatabase { fn vendored(&self) -> &VendoredFileSystem { - red_knot_vendored::file_system() + ty_vendored::file_system() } fn system(&self) -> &dyn System { @@ -210,12 +210,12 @@ pub(crate) mod tests { use salsa::Event; - use red_knot_python_semantic::lint::{LintRegistry, RuleSelection}; - use red_knot_python_semantic::{Db as SemanticDb, Program}; use ruff_db::files::Files; use ruff_db::system::{DbWithTestSystem, System, TestSystem}; use ruff_db::vendored::VendoredFileSystem; use ruff_db::{Db as SourceDb, Upcast}; + use ty_python_semantic::lint::{LintRegistry, RuleSelection}; + use ty_python_semantic::{Db as SemanticDb, Program}; use crate::db::Db; use crate::DEFAULT_LINT_REGISTRY; @@ -237,7 +237,7 @@ pub(crate) mod tests { let mut db = Self { storage: salsa::Storage::default(), system: TestSystem::default(), - vendored: red_knot_vendored::file_system().clone(), + vendored: ty_vendored::file_system().clone(), files: Files::default(), events: Arc::default(), project: None, @@ -310,7 +310,7 @@ pub(crate) mod tests { } #[salsa::db] - impl red_knot_python_semantic::Db for TestDb { + impl ty_python_semantic::Db for TestDb { fn is_file_open(&self, file: ruff_db::files::File) -> bool { !file.path(self).is_vendored_path() } diff --git a/crates/red_knot_project/src/db/changes.rs b/crates/ty_project/src/db/changes.rs similarity index 98% rename from crates/red_knot_project/src/db/changes.rs rename to crates/ty_project/src/db/changes.rs index 4ba90af10f..a5bc9e38e3 100644 --- a/crates/red_knot_project/src/db/changes.rs +++ b/crates/ty_project/src/db/changes.rs @@ -5,11 +5,11 @@ use crate::{Project, ProjectMetadata}; use std::collections::BTreeSet; use crate::walk::ProjectFilesWalker; -use red_knot_python_semantic::Program; use ruff_db::files::{File, Files}; use ruff_db::system::SystemPath; use ruff_db::Db as _; use rustc_hash::FxHashSet; +use ty_python_semantic::Program; impl ProjectDatabase { #[tracing::instrument(level = "debug", skip(self, changes, cli_options))] @@ -44,7 +44,7 @@ impl ProjectDatabase { if let Some(path) = change.system_path() { if matches!( path.file_name(), - Some(".gitignore" | ".ignore" | "knot.toml" | "pyproject.toml") + Some(".gitignore" | ".ignore" | "ty.toml" | "pyproject.toml") ) { // Changes to ignore files or settings can change the project structure or add/remove files. project_changed = true; diff --git a/crates/red_knot_project/src/files.rs b/crates/ty_project/src/files.rs similarity index 100% rename from crates/red_knot_project/src/files.rs rename to crates/ty_project/src/files.rs diff --git a/crates/red_knot_project/src/lib.rs b/crates/ty_project/src/lib.rs similarity index 97% rename from crates/red_knot_project/src/lib.rs rename to crates/ty_project/src/lib.rs index cf953f2b26..3a91a00362 100644 --- a/crates/red_knot_project/src/lib.rs +++ b/crates/ty_project/src/lib.rs @@ -6,9 +6,6 @@ pub use db::{Db, ProjectDatabase}; use files::{Index, Indexed, IndexedFiles}; use metadata::settings::Settings; pub use metadata::{ProjectDiscoveryError, ProjectMetadata}; -use red_knot_python_semantic::lint::{LintRegistry, LintRegistryBuilder, RuleSelection}; -use red_knot_python_semantic::register_lints; -use red_knot_python_semantic::types::check_types; use ruff_db::diagnostic::{ create_parse_diagnostic, create_unsupported_syntax_diagnostic, Annotation, Diagnostic, DiagnosticId, Severity, Span, SubDiagnostic, @@ -25,6 +22,9 @@ use std::panic::{AssertUnwindSafe, UnwindSafe}; use std::sync::Arc; use thiserror::Error; use tracing::error; +use ty_python_semantic::lint::{LintRegistry, LintRegistryBuilder, RuleSelection}; +use ty_python_semantic::register_lints; +use ty_python_semantic::types::check_types; pub mod combine; @@ -84,7 +84,7 @@ pub struct Project { /// However, it's sometimes desired to only check a subset of the project, e.g. to see /// the diagnostics for a single file or a folder. /// - /// This list gets initialized by the paths passed to `knot check ` + /// This list gets initialized by the paths passed to `ty check ` /// /// ## How is this different from `open_files`? /// @@ -139,7 +139,7 @@ impl Project { /// Returns `true` if `path` is both part of the project and included (see `included_paths_list`). /// /// Unlike [Self::files], this method does not respect `.gitignore` files. It only checks - /// the project's include and exclude settings as well as the paths that were passed to `knot check `. + /// the project's include and exclude settings as well as the paths that were passed to `ty check `. /// This means, that this method is an over-approximation of `Self::files` and may return `true` for paths /// that won't be included when checking the project because they're ignored in a `.gitignore` file. pub fn is_path_included(self, db: &dyn Db, path: &SystemPath) -> bool { @@ -301,7 +301,7 @@ impl Project { /// /// The default is to check the entire project in which case this method returns /// the project root. However, users can specify to only check specific sub-folders or - /// even files of a project by using `knot check `. In that case, this method + /// even files of a project by using `ty check `. In that case, this method /// returns the provided absolute paths. /// /// Note: The CLI doesn't prohibit users from specifying paths outside the project root. @@ -605,10 +605,10 @@ where let mut diagnostic = Diagnostic::new(DiagnosticId::Panic, Severity::Fatal, message); diagnostic.sub(SubDiagnostic::new( Severity::Info, - "This indicates a bug in Red Knot.", + "This indicates a bug in ty.", )); - let report_message = "If you could open an issue at https://github.com/astral-sh/ruff/issues/new?title=%5Bred-knot%5D:%20panic we'd be very appreciative!"; + let report_message = "If you could open an issue at https://github.com/astral-sh/ty/issues/new?title=%5Bpanic%5D we'd be very appreciative!"; diagnostic.sub(SubDiagnostic::new(Severity::Info, report_message)); diagnostic.sub(SubDiagnostic::new( Severity::Info, @@ -659,14 +659,14 @@ where mod tests { use crate::db::tests::TestDb; use crate::{check_file_impl, ProjectMetadata}; - use red_knot_python_semantic::types::check_types; - use red_knot_python_semantic::{Program, ProgramSettings, PythonPlatform, SearchPathSettings}; use ruff_db::files::system_path_to_file; use ruff_db::source::source_text; use ruff_db::system::{DbWithTestSystem, DbWithWritableSystem as _, SystemPath, SystemPathBuf}; use ruff_db::testing::assert_function_query_was_not_run; use ruff_python_ast::name::Name; use ruff_python_ast::PythonVersion; + use ty_python_semantic::types::check_types; + use ty_python_semantic::{Program, ProgramSettings, PythonPlatform, SearchPathSettings}; #[test] fn check_file_skips_type_checking_when_file_cant_be_read() -> ruff_db::system::Result<()> { diff --git a/crates/red_knot_project/src/metadata.rs b/crates/ty_project/src/metadata.rs similarity index 93% rename from crates/red_knot_project/src/metadata.rs rename to crates/ty_project/src/metadata.rs index dc80da724e..c0061019eb 100644 --- a/crates/red_knot_project/src/metadata.rs +++ b/crates/ty_project/src/metadata.rs @@ -1,15 +1,15 @@ use configuration_file::{ConfigurationFile, ConfigurationFileError}; -use red_knot_python_semantic::ProgramSettings; use ruff_db::system::{System, SystemPath, SystemPathBuf}; use ruff_python_ast::name::Name; use std::sync::Arc; use thiserror::Error; +use ty_python_semantic::ProgramSettings; use crate::combine::Combine; use crate::metadata::pyproject::{Project, PyProject, PyProjectError, ResolveRequiresPythonError}; use crate::metadata::value::ValueSource; -use options::KnotTomlError; use options::Options; +use options::TyTomlError; mod configuration_file; pub mod options; @@ -54,10 +54,7 @@ impl ProjectMetadata { root: SystemPathBuf, ) -> Result { Self::from_options( - pyproject - .tool - .and_then(|tool| tool.knot) - .unwrap_or_default(), + pyproject.tool.and_then(|tool| tool.ty).unwrap_or_default(), root, pyproject.project.as_ref(), ) @@ -103,7 +100,7 @@ impl ProjectMetadata { /// The algorithm traverses upwards in the `path`'s ancestor chain and uses the following precedence /// the resolve the project's root. /// - /// 1. The closest `pyproject.toml` with a `tool.knot` section or `knot.toml`. + /// 1. The closest `pyproject.toml` with a `tool.ty` section or `ty.toml`. /// 1. The closest `pyproject.toml`. /// 1. Fallback to use `path` as the root and use the default settings. pub fn discover( @@ -138,17 +135,17 @@ impl ProjectMetadata { None }; - // A `knot.toml` takes precedence over a `pyproject.toml`. - let knot_toml_path = project_root.join("knot.toml"); - if let Ok(knot_str) = system.read_to_string(&knot_toml_path) { + // A `ty.toml` takes precedence over a `pyproject.toml`. + let ty_toml_path = project_root.join("ty.toml"); + if let Ok(ty_str) = system.read_to_string(&ty_toml_path) { let options = match Options::from_toml_str( - &knot_str, - ValueSource::File(Arc::new(knot_toml_path.clone())), + &ty_str, + ValueSource::File(Arc::new(ty_toml_path.clone())), ) { Ok(options) => options, Err(error) => { - return Err(ProjectDiscoveryError::InvalidKnotToml { - path: knot_toml_path, + return Err(ProjectDiscoveryError::InvalidTyToml { + path: ty_toml_path, source: Box::new(error), }) } @@ -156,10 +153,10 @@ impl ProjectMetadata { if pyproject .as_ref() - .is_some_and(|project| project.knot().is_some()) + .is_some_and(|project| project.ty().is_some()) { // TODO: Consider using a diagnostic here - tracing::warn!("Ignoring the `tool.knot` section in `{pyproject_path}` because `{knot_toml_path}` takes precedence."); + tracing::warn!("Ignoring the `tool.ty` section in `{pyproject_path}` because `{ty_toml_path}` takes precedence."); } tracing::debug!("Found project at '{}'", project_root); @@ -182,7 +179,7 @@ impl ProjectMetadata { } if let Some(pyproject) = pyproject { - let has_knot_section = pyproject.knot().is_some(); + let has_ty_section = pyproject.ty().is_some(); let metadata = ProjectMetadata::from_pyproject(pyproject, project_root.to_path_buf()) .map_err( @@ -192,7 +189,7 @@ impl ProjectMetadata { }, )?; - if has_knot_section { + if has_ty_section { tracing::debug!("Found project at '{}'", project_root); return Ok(metadata); @@ -208,7 +205,7 @@ impl ProjectMetadata { // No project found, but maybe a pyproject.toml was found. let metadata = if let Some(closest_project) = closest_project { tracing::debug!( - "Project without `tool.knot` section: '{}'", + "Project without `tool.ty` section: '{}'", closest_project.root() ); @@ -290,9 +287,9 @@ pub enum ProjectDiscoveryError { path: SystemPathBuf, }, - #[error("{path} is not a valid `knot.toml`: {source}")] - InvalidKnotToml { - source: Box, + #[error("{path} is not a valid `ty.toml`: {source}")] + InvalidTyToml { + source: Box, path: SystemPathBuf, }, @@ -400,7 +397,7 @@ mod tests { [project] name = "backend" - [tool.knot + [tool.ty "#, ), (root.join("db/__init__.py"), ""), @@ -413,10 +410,10 @@ mod tests { assert_error_eq( &error, - r#"/app/pyproject.toml is not a valid `pyproject.toml`: TOML parse error at line 5, column 31 + r#"/app/pyproject.toml is not a valid `pyproject.toml`: TOML parse error at line 5, column 29 | -5 | [tool.knot - | ^ +5 | [tool.ty + | ^ invalid table header expected `.`, `]` "#, @@ -439,7 +436,7 @@ expected `.`, `]` [project] name = "project-root" - [tool.knot.src] + [tool.ty.src] root = "src" "#, ), @@ -449,7 +446,7 @@ expected `.`, `]` [project] name = "nested-project" - [tool.knot.src] + [tool.ty.src] root = "src" "#, ), @@ -489,7 +486,7 @@ expected `.`, `]` [project] name = "project-root" - [tool.knot.src] + [tool.ty.src] root = "src" "#, ), @@ -499,7 +496,7 @@ expected `.`, `]` [project] name = "nested-project" - [tool.knot.src] + [tool.ty.src] root = "src" "#, ), @@ -526,7 +523,7 @@ expected `.`, `]` } #[test] - fn nested_projects_without_knot_sections() -> anyhow::Result<()> { + fn nested_projects_without_ty_sections() -> anyhow::Result<()> { let system = TestSystem::default(); let root = SystemPathBuf::from("/app"); @@ -566,7 +563,7 @@ expected `.`, `]` } #[test] - fn nested_projects_with_outer_knot_section() -> anyhow::Result<()> { + fn nested_projects_with_outer_ty_section() -> anyhow::Result<()> { let system = TestSystem::default(); let root = SystemPathBuf::from("/app"); @@ -579,7 +576,7 @@ expected `.`, `]` [project] name = "project-root" - [tool.knot.environment] + [tool.ty.environment] python-version = "3.10" "#, ), @@ -612,12 +609,12 @@ expected `.`, `]` Ok(()) } - /// A `knot.toml` takes precedence over any `pyproject.toml`. + /// A `ty.toml` takes precedence over any `pyproject.toml`. /// /// However, the `pyproject.toml` is still loaded to get the project name and, in the future, /// the requires-python constraint. #[test] - fn project_with_knot_and_pyproject_toml() -> anyhow::Result<()> { + fn project_with_ty_and_pyproject_toml() -> anyhow::Result<()> { let system = TestSystem::default(); let root = SystemPathBuf::from("/app"); @@ -631,12 +628,12 @@ expected `.`, `]` name = "super-app" requires-python = ">=3.12" - [tool.knot.src] + [tool.ty.src] root = "this_option_is_ignored" "#, ), ( - root.join("knot.toml"), + root.join("ty.toml"), r#" [src] root = "src" @@ -834,7 +831,7 @@ expected `.`, `]` [project] requires-python = ">=3.12" - [tool.knot.environment] + [tool.ty.environment] python-version = "3.10" "#, ) diff --git a/crates/red_knot_project/src/metadata/configuration_file.rs b/crates/ty_project/src/metadata/configuration_file.rs similarity index 66% rename from crates/red_knot_project/src/metadata/configuration_file.rs rename to crates/ty_project/src/metadata/configuration_file.rs index 03db373e36..4190d2cd8b 100644 --- a/crates/red_knot_project/src/metadata/configuration_file.rs +++ b/crates/ty_project/src/metadata/configuration_file.rs @@ -5,9 +5,9 @@ use thiserror::Error; use crate::metadata::value::ValueSource; -use super::options::{KnotTomlError, Options}; +use super::options::{Options, TyTomlError}; -/// A `knot.toml` configuration file with the options it contains. +/// A `ty.toml` configuration file with the options it contains. pub(crate) struct ConfigurationFile { path: SystemPathBuf, options: Options, @@ -23,28 +23,28 @@ impl ConfigurationFile { return Ok(None); }; - let knot_toml_path = configuration_directory.join("knot").join("knot.toml"); + let ty_toml_path = configuration_directory.join("ty").join("ty.toml"); tracing::debug!( "Searching for a user-level configuration at `{path}`", - path = &knot_toml_path + path = &ty_toml_path ); - let Ok(knot_toml_str) = system.read_to_string(&knot_toml_path) else { + let Ok(ty_toml_str) = system.read_to_string(&ty_toml_path) else { return Ok(None); }; match Options::from_toml_str( - &knot_toml_str, - ValueSource::File(Arc::new(knot_toml_path.clone())), + &ty_toml_str, + ValueSource::File(Arc::new(ty_toml_path.clone())), ) { Ok(options) => Ok(Some(Self { - path: knot_toml_path, + path: ty_toml_path, options, })), - Err(error) => Err(ConfigurationFileError::InvalidKnotToml { + Err(error) => Err(ConfigurationFileError::InvalidTyToml { source: Box::new(error), - path: knot_toml_path, + path: ty_toml_path, }), } } @@ -61,9 +61,9 @@ impl ConfigurationFile { #[derive(Debug, Error)] pub enum ConfigurationFileError { - #[error("{path} is not a valid `knot.toml`: {source}")] - InvalidKnotToml { - source: Box, + #[error("{path} is not a valid `ty.toml`: {source}")] + InvalidTyToml { + source: Box, path: SystemPathBuf, }, } diff --git a/crates/red_knot_project/src/metadata/options.rs b/crates/ty_project/src/metadata/options.rs similarity index 94% rename from crates/red_knot_project/src/metadata/options.rs rename to crates/ty_project/src/metadata/options.rs index 47a24dd81d..796b8d5092 100644 --- a/crates/red_knot_project/src/metadata/options.rs +++ b/crates/ty_project/src/metadata/options.rs @@ -1,7 +1,5 @@ use crate::metadata::value::{RangedValue, RelativePathBuf, ValueSource, ValueSourceGuard}; use crate::Db; -use red_knot_python_semantic::lint::{GetLintError, Level, LintSource, RuleSelection}; -use red_knot_python_semantic::{ProgramSettings, PythonPath, PythonPlatform, SearchPathSettings}; use ruff_db::diagnostic::{Annotation, Diagnostic, DiagnosticFormat, DiagnosticId, Severity, Span}; use ruff_db::files::system_path_to_file; use ruff_db::system::{System, SystemPath}; @@ -11,6 +9,8 @@ use rustc_hash::FxHashMap; use serde::{Deserialize, Serialize}; use std::fmt::Debug; use thiserror::Error; +use ty_python_semantic::lint::{GetLintError, Level, LintSource, RuleSelection}; +use ty_python_semantic::{ProgramSettings, PythonPath, PythonPlatform, SearchPathSettings}; use super::settings::{Settings, TerminalSettings}; @@ -38,7 +38,7 @@ pub struct Options { } impl Options { - pub(crate) fn from_toml_str(content: &str, source: ValueSource) -> Result { + pub(crate) fn from_toml_str(content: &str, source: ValueSource) -> Result { let _guard = ValueSourceGuard::new(source, true); let options = toml::from_str(content)?; Ok(options) @@ -233,17 +233,17 @@ pub struct EnvironmentOptions { /// Specifies the version of Python that will be used to analyze the source code. /// The version should be specified as a string in the format `M.m` where `M` is the major version /// and `m` is the minor (e.g. "3.0" or "3.6"). - /// If a version is provided, knot will generate errors if the source code makes use of language features + /// If a version is provided, ty will generate errors if the source code makes use of language features /// that are not supported in that version. /// It will also tailor its use of type stub files, which conditionalizes type definitions based on the version. #[serde(skip_serializing_if = "Option::is_none")] pub python_version: Option>, /// Specifies the target platform that will be used to analyze the source code. - /// If specified, Red Knot will tailor its use of type stub files, + /// If specified, ty will tailor its use of type stub files, /// which conditionalize type definitions based on the platform. /// - /// If no platform is specified, knot will use the current platform: + /// If no platform is specified, ty will use the current platform: /// - `win32` for Windows /// - `darwin` for macOS /// - `android` for Android @@ -264,9 +264,9 @@ pub struct EnvironmentOptions { #[serde(skip_serializing_if = "Option::is_none")] pub typeshed: Option, - /// Path to the Python installation from which Red Knot resolves type information and third-party dependencies. + /// Path to the Python installation from which ty resolves type information and third-party dependencies. /// - /// Red Knot will search in the path's `site-packages` directories for type information and + /// ty will search in the path's `site-packages` directories for type information and /// third-party imports. /// /// This option is commonly used to specify the path to a virtual environment. @@ -319,12 +319,12 @@ pub struct TerminalOptions { #[cfg(feature = "schemars")] mod schema { use crate::DEFAULT_LINT_REGISTRY; - use red_knot_python_semantic::lint::Level; use schemars::gen::SchemaGenerator; use schemars::schema::{ InstanceType, Metadata, ObjectValidation, Schema, SchemaObject, SubschemaValidation, }; use schemars::JsonSchema; + use ty_python_semantic::lint::Level; pub(super) struct Rules; @@ -366,8 +366,8 @@ mod schema { instance_type: Some(InstanceType::Object.into()), object: Some(Box::new(ObjectValidation { properties, - // Allow unknown rules: Red Knot will warn about them. - // It gives a better experience when using an older Red Knot version because + // Allow unknown rules: ty will warn about them. + // It gives a better experience when using an older ty version because // the schema will not deny rules that have been removed in newer versions. additional_properties: Some(Box::new(level_schema)), ..ObjectValidation::default() @@ -380,7 +380,7 @@ mod schema { } #[derive(Error, Debug)] -pub enum KnotTomlError { +pub enum TyTomlError { #[error(transparent)] TomlSyntax(#[from] toml::de::Error), } diff --git a/crates/red_knot_project/src/metadata/pyproject.rs b/crates/ty_project/src/metadata/pyproject.rs similarity index 98% rename from crates/red_knot_project/src/metadata/pyproject.rs rename to crates/ty_project/src/metadata/pyproject.rs index 2be857f50e..a32c3b60d4 100644 --- a/crates/red_knot_project/src/metadata/pyproject.rs +++ b/crates/ty_project/src/metadata/pyproject.rs @@ -18,8 +18,8 @@ pub struct PyProject { } impl PyProject { - pub(crate) fn knot(&self) -> Option<&Options> { - self.tool.as_ref().and_then(|tool| tool.knot.as_ref()) + pub(crate) fn ty(&self) -> Option<&Options> { + self.tool.as_ref().and_then(|tool| tool.ty.as_ref()) } } @@ -126,7 +126,7 @@ pub enum ResolveRequiresPythonError { #[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "kebab-case")] pub struct Tool { - pub knot: Option, + pub ty: Option, } /// The normalized name of a package. diff --git a/crates/red_knot_project/src/metadata/settings.rs b/crates/ty_project/src/metadata/settings.rs similarity index 92% rename from crates/red_knot_project/src/metadata/settings.rs rename to crates/ty_project/src/metadata/settings.rs index f5572f6657..b635c5470d 100644 --- a/crates/red_knot_project/src/metadata/settings.rs +++ b/crates/ty_project/src/metadata/settings.rs @@ -1,7 +1,7 @@ use std::sync::Arc; -use red_knot_python_semantic::lint::RuleSelection; use ruff_db::diagnostic::DiagnosticFormat; +use ty_python_semantic::lint::RuleSelection; /// The resolved [`super::Options`] for the project. /// @@ -15,7 +15,7 @@ use ruff_db::diagnostic::DiagnosticFormat; /// changing the terminal settings shouldn't invalidate any core type-checking queries. /// This can be achieved by adding a salsa query for the type checking specific settings. /// -/// Settings that are part of [`red_knot_python_semantic::ProgramSettings`] are not included here. +/// Settings that are part of [`ty_python_semantic::ProgramSettings`] are not included here. #[derive(Clone, Debug, Eq, PartialEq)] pub struct Settings { rules: Arc, diff --git a/crates/red_knot_project/src/metadata/value.rs b/crates/ty_project/src/metadata/value.rs similarity index 100% rename from crates/red_knot_project/src/metadata/value.rs rename to crates/ty_project/src/metadata/value.rs diff --git a/crates/red_knot_project/src/walk.rs b/crates/ty_project/src/walk.rs similarity index 99% rename from crates/red_knot_project/src/walk.rs rename to crates/ty_project/src/walk.rs index 582b1ac032..c7cc7fd212 100644 --- a/crates/red_knot_project/src/walk.rs +++ b/crates/ty_project/src/walk.rs @@ -35,7 +35,7 @@ impl<'a> ProjectFilesFilter<'a> { /// Returns `true` if a file is part of the project and included in the paths to check. /// /// A file is included in the checked files if it is a sub path of the project's root - /// (when no CLI path arguments are specified) or if it is a sub path of any path provided on the CLI (`knot check `) AND: + /// (when no CLI path arguments are specified) or if it is a sub path of any path provided on the CLI (`ty check `) AND: /// /// * It matches a positive `include` pattern and isn't excluded by a later negative `include` pattern. /// * It doesn't match a positive `exclude` pattern or is re-included by a later negative `exclude` pattern. diff --git a/crates/red_knot_project/src/watch.rs b/crates/ty_project/src/watch.rs similarity index 100% rename from crates/red_knot_project/src/watch.rs rename to crates/ty_project/src/watch.rs diff --git a/crates/red_knot_project/src/watch/project_watcher.rs b/crates/ty_project/src/watch/project_watcher.rs similarity index 98% rename from crates/red_knot_project/src/watch/project_watcher.rs rename to crates/ty_project/src/watch/project_watcher.rs index 8179575919..33419c2a9d 100644 --- a/crates/red_knot_project/src/watch/project_watcher.rs +++ b/crates/ty_project/src/watch/project_watcher.rs @@ -3,10 +3,10 @@ use std::hash::Hasher; use tracing::info; -use red_knot_python_semantic::system_module_search_paths; use ruff_cache::{CacheKey, CacheKeyHasher}; use ruff_db::system::{SystemPath, SystemPathBuf}; use ruff_db::Upcast; +use ty_python_semantic::system_module_search_paths; use crate::db::{Db, ProjectDatabase}; use crate::watch::Watcher; diff --git a/crates/red_knot_project/src/watch/watcher.rs b/crates/ty_project/src/watch/watcher.rs similarity index 100% rename from crates/red_knot_project/src/watch/watcher.rs rename to crates/ty_project/src/watch/watcher.rs diff --git a/crates/red_knot_project/tests/check.rs b/crates/ty_project/tests/check.rs similarity index 98% rename from crates/red_knot_project/tests/check.rs rename to crates/ty_project/tests/check.rs index 276612c3d8..8a56d3099a 100644 --- a/crates/red_knot_project/tests/check.rs +++ b/crates/ty_project/tests/check.rs @@ -1,6 +1,4 @@ use anyhow::{anyhow, Context}; -use red_knot_project::{ProjectDatabase, ProjectMetadata}; -use red_knot_python_semantic::{HasType, SemanticModel}; use ruff_db::files::{system_path_to_file, File}; use ruff_db::parsed::parsed_module; use ruff_db::system::{SystemPath, SystemPathBuf, TestSystem}; @@ -9,6 +7,8 @@ use ruff_python_ast::visitor::source_order::SourceOrderVisitor; use ruff_python_ast::{ self as ast, Alias, Comprehension, Expr, Parameter, ParameterWithDefault, Stmt, }; +use ty_project::{ProjectDatabase, ProjectMetadata}; +use ty_python_semantic::{HasType, SemanticModel}; fn setup_db(project_root: &SystemPath, system: TestSystem) -> anyhow::Result { let project = ProjectMetadata::discover(project_root, &system)?; @@ -72,7 +72,7 @@ fn linter_stubs_no_panic() -> anyhow::Result<()> { fn typeshed_no_panic() -> anyhow::Result<()> { let workspace_root = get_cargo_workspace_root()?; run_corpus_tests(&format!( - "{workspace_root}/crates/red_knot_vendored/vendor/typeshed/**/*.pyi" + "{workspace_root}/crates/ty_vendored/vendor/typeshed/**/*.pyi" )) } diff --git a/crates/red_knot_python_semantic/Cargo.toml b/crates/ty_python_semantic/Cargo.toml similarity index 91% rename from crates/red_knot_python_semantic/Cargo.toml rename to crates/ty_python_semantic/Cargo.toml index c1ef36cb14..91e26b8fb5 100644 --- a/crates/red_knot_python_semantic/Cargo.toml +++ b/crates/ty_python_semantic/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "red_knot_python_semantic" +name = "ty_python_semantic" version = "0.0.0" publish = false authors = { workspace = true } @@ -42,14 +42,14 @@ smallvec = { workspace = true } static_assertions = { workspace = true } test-case = { workspace = true } memchr = { workspace = true } -strum = { workspace = true} -strum_macros = { workspace = true} +strum = { workspace = true } +strum_macros = { workspace = true } [dev-dependencies] ruff_db = { workspace = true, features = ["testing", "os"] } ruff_python_parser = { workspace = true } -red_knot_test = { workspace = true } -red_knot_vendored = { workspace = true } +ty_test = { workspace = true } +ty_vendored = { workspace = true } anyhow = { workspace = true } dir-test = { workspace = true } diff --git a/crates/red_knot_python_semantic/build.rs b/crates/ty_python_semantic/build.rs similarity index 100% rename from crates/red_knot_python_semantic/build.rs rename to crates/ty_python_semantic/build.rs diff --git a/crates/red_knot_python_semantic/mdtest.py b/crates/ty_python_semantic/mdtest.py similarity index 96% rename from crates/red_knot_python_semantic/mdtest.py rename to crates/ty_python_semantic/mdtest.py index 9869295479..e238c9ce89 100644 --- a/crates/red_knot_python_semantic/mdtest.py +++ b/crates/ty_python_semantic/mdtest.py @@ -1,4 +1,4 @@ -"""A runner for Markdown-based tests for Red Knot""" +"""A runner for Markdown-based tests for ty""" # /// script # requires-python = ">=3.11" # dependencies = [ @@ -18,13 +18,13 @@ from typing import Final, Literal, Never, assert_never from rich.console import Console from watchfiles import Change, watch -CRATE_NAME: Final = "red_knot_python_semantic" +CRATE_NAME: Final = "ty_python_semantic" CRATE_ROOT: Final = Path(__file__).resolve().parent -RED_KNOT_VENDORED: Final = CRATE_ROOT.parent / "red_knot_vendored" +TY_VENDORED: Final = CRATE_ROOT.parent / "ty_vendored" DIRS_TO_WATCH: Final = ( CRATE_ROOT, - RED_KNOT_VENDORED, - CRATE_ROOT.parent / "red_knot_test/src", + TY_VENDORED, + CRATE_ROOT.parent / "ty_test/src", ) MDTEST_DIR: Final = CRATE_ROOT / "resources" / "mdtest" @@ -176,7 +176,7 @@ class MDTestRunner: match path.suffix: case ".rs": rust_code_has_changed = True - case ".pyi" if path.is_relative_to(RED_KNOT_VENDORED): + case ".pyi" if path.is_relative_to(TY_VENDORED): vendored_typeshed_has_changed = True case ".md": pass diff --git a/crates/red_knot_python_semantic/mdtest.py.lock b/crates/ty_python_semantic/mdtest.py.lock similarity index 100% rename from crates/red_knot_python_semantic/mdtest.py.lock rename to crates/ty_python_semantic/mdtest.py.lock diff --git a/crates/red_knot_python_semantic/resources/README.md b/crates/ty_python_semantic/resources/README.md similarity index 66% rename from crates/red_knot_python_semantic/resources/README.md rename to crates/ty_python_semantic/resources/README.md index 0a04772b9a..ea0a69f18c 100644 --- a/crates/red_knot_python_semantic/resources/README.md +++ b/crates/ty_python_semantic/resources/README.md @@ -1,4 +1,4 @@ Markdown files within the `mdtest/` subdirectory are tests of type inference and type checking; executed by the `tests/mdtest.rs` integration test. -See `crates/red_knot_test/README.md` for documentation of this test format. +See `crates/ty_test/README.md` for documentation of this test format. diff --git a/crates/red_knot_python_semantic/resources/mdtest/.mdformat.toml b/crates/ty_python_semantic/resources/mdtest/.mdformat.toml similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/.mdformat.toml rename to crates/ty_python_semantic/resources/mdtest/.mdformat.toml diff --git a/crates/red_knot_python_semantic/resources/mdtest/annotations/annotated.md b/crates/ty_python_semantic/resources/mdtest/annotations/annotated.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/annotations/annotated.md rename to crates/ty_python_semantic/resources/mdtest/annotations/annotated.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/annotations/any.md b/crates/ty_python_semantic/resources/mdtest/annotations/any.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/annotations/any.md rename to crates/ty_python_semantic/resources/mdtest/annotations/any.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/annotations/callable.md b/crates/ty_python_semantic/resources/mdtest/annotations/callable.md similarity index 99% rename from crates/red_knot_python_semantic/resources/mdtest/annotations/callable.md rename to crates/ty_python_semantic/resources/mdtest/annotations/callable.md index 9bd7ae8742..1fe2aa65d5 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/annotations/callable.md +++ b/crates/ty_python_semantic/resources/mdtest/annotations/callable.md @@ -173,7 +173,7 @@ def _( ```py from typing import Callable, Union -from knot_extensions import Intersection, Not +from ty_extensions import Intersection, Not def _( c: Intersection[Callable[[Union[int, str]], int], int], diff --git a/crates/red_knot_python_semantic/resources/mdtest/annotations/deferred.md b/crates/ty_python_semantic/resources/mdtest/annotations/deferred.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/annotations/deferred.md rename to crates/ty_python_semantic/resources/mdtest/annotations/deferred.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/annotations/int_float_complex.md b/crates/ty_python_semantic/resources/mdtest/annotations/int_float_complex.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/annotations/int_float_complex.md rename to crates/ty_python_semantic/resources/mdtest/annotations/int_float_complex.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/annotations/invalid.md b/crates/ty_python_semantic/resources/mdtest/annotations/invalid.md similarity index 99% rename from crates/red_knot_python_semantic/resources/mdtest/annotations/invalid.md rename to crates/ty_python_semantic/resources/mdtest/annotations/invalid.md index e2b522190f..96a9dfe32d 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/annotations/invalid.md +++ b/crates/ty_python_semantic/resources/mdtest/annotations/invalid.md @@ -6,7 +6,7 @@ Many types are illegal in the context of a type expression: ```py import typing -from knot_extensions import AlwaysTruthy, AlwaysFalsy +from ty_extensions import AlwaysTruthy, AlwaysFalsy from typing_extensions import Literal, Never class A: ... diff --git a/crates/red_knot_python_semantic/resources/mdtest/annotations/literal.md b/crates/ty_python_semantic/resources/mdtest/annotations/literal.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/annotations/literal.md rename to crates/ty_python_semantic/resources/mdtest/annotations/literal.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/annotations/literal_string.md b/crates/ty_python_semantic/resources/mdtest/annotations/literal_string.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/annotations/literal_string.md rename to crates/ty_python_semantic/resources/mdtest/annotations/literal_string.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/annotations/never.md b/crates/ty_python_semantic/resources/mdtest/annotations/never.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/annotations/never.md rename to crates/ty_python_semantic/resources/mdtest/annotations/never.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/annotations/new_types.md b/crates/ty_python_semantic/resources/mdtest/annotations/new_types.md similarity index 89% rename from crates/red_knot_python_semantic/resources/mdtest/annotations/new_types.md rename to crates/ty_python_semantic/resources/mdtest/annotations/new_types.md index 0c5142ef70..2fb342aeb4 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/annotations/new_types.md +++ b/crates/ty_python_semantic/resources/mdtest/annotations/new_types.md @@ -1,6 +1,6 @@ # NewType -Currently, red-knot doesn't support `typing.NewType` in type annotations. +Currently, ty doesn't support `typing.NewType` in type annotations. ## Valid forms diff --git a/crates/red_knot_python_semantic/resources/mdtest/annotations/optional.md b/crates/ty_python_semantic/resources/mdtest/annotations/optional.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/annotations/optional.md rename to crates/ty_python_semantic/resources/mdtest/annotations/optional.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/annotations/starred.md b/crates/ty_python_semantic/resources/mdtest/annotations/starred.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/annotations/starred.md rename to crates/ty_python_semantic/resources/mdtest/annotations/starred.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/annotations/stdlib_typing_aliases.md b/crates/ty_python_semantic/resources/mdtest/annotations/stdlib_typing_aliases.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/annotations/stdlib_typing_aliases.md rename to crates/ty_python_semantic/resources/mdtest/annotations/stdlib_typing_aliases.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/annotations/string.md b/crates/ty_python_semantic/resources/mdtest/annotations/string.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/annotations/string.md rename to crates/ty_python_semantic/resources/mdtest/annotations/string.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/annotations/union.md b/crates/ty_python_semantic/resources/mdtest/annotations/union.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/annotations/union.md rename to crates/ty_python_semantic/resources/mdtest/annotations/union.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/annotations/unsupported_special_forms.md b/crates/ty_python_semantic/resources/mdtest/annotations/unsupported_special_forms.md similarity index 95% rename from crates/red_knot_python_semantic/resources/mdtest/annotations/unsupported_special_forms.md rename to crates/ty_python_semantic/resources/mdtest/annotations/unsupported_special_forms.md index 3f254ebe47..14c595992c 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/annotations/unsupported_special_forms.md +++ b/crates/ty_python_semantic/resources/mdtest/annotations/unsupported_special_forms.md @@ -2,8 +2,8 @@ ## Not yet supported -Several special forms are unsupported by red-knot currently. However, we also don't emit -false-positive errors if you use one in an annotation: +Several special forms are unsupported by ty currently. However, we also don't emit false-positive +errors if you use one in an annotation: ```py from typing_extensions import Self, TypeVarTuple, Unpack, TypeGuard, TypeIs, Concatenate, ParamSpec, TypeAlias, Callable, TypeVar diff --git a/crates/red_knot_python_semantic/resources/mdtest/annotations/unsupported_type_qualifiers.md b/crates/ty_python_semantic/resources/mdtest/annotations/unsupported_type_qualifiers.md similarity index 93% rename from crates/red_knot_python_semantic/resources/mdtest/annotations/unsupported_type_qualifiers.md rename to crates/ty_python_semantic/resources/mdtest/annotations/unsupported_type_qualifiers.md index fcc61160f2..271b6fd014 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/annotations/unsupported_type_qualifiers.md +++ b/crates/ty_python_semantic/resources/mdtest/annotations/unsupported_type_qualifiers.md @@ -2,8 +2,8 @@ ## Not yet fully supported -Several type qualifiers are unsupported by red-knot currently. However, we also don't emit -false-positive errors if you use one in an annotation: +Several type qualifiers are unsupported by ty currently. However, we also don't emit false-positive +errors if you use one in an annotation: ```py from typing_extensions import Final, Required, NotRequired, ReadOnly, TypedDict diff --git a/crates/red_knot_python_semantic/resources/mdtest/assignment/annotations.md b/crates/ty_python_semantic/resources/mdtest/assignment/annotations.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/assignment/annotations.md rename to crates/ty_python_semantic/resources/mdtest/assignment/annotations.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/assignment/augmented.md b/crates/ty_python_semantic/resources/mdtest/assignment/augmented.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/assignment/augmented.md rename to crates/ty_python_semantic/resources/mdtest/assignment/augmented.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/assignment/multi_target.md b/crates/ty_python_semantic/resources/mdtest/assignment/multi_target.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/assignment/multi_target.md rename to crates/ty_python_semantic/resources/mdtest/assignment/multi_target.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/assignment/unbound.md b/crates/ty_python_semantic/resources/mdtest/assignment/unbound.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/assignment/unbound.md rename to crates/ty_python_semantic/resources/mdtest/assignment/unbound.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/assignment/walrus.md b/crates/ty_python_semantic/resources/mdtest/assignment/walrus.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/assignment/walrus.md rename to crates/ty_python_semantic/resources/mdtest/assignment/walrus.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/attributes.md b/crates/ty_python_semantic/resources/mdtest/attributes.md similarity index 99% rename from crates/red_knot_python_semantic/resources/mdtest/attributes.md rename to crates/ty_python_semantic/resources/mdtest/attributes.md index 72dca325f9..682cc3a981 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/attributes.md +++ b/crates/ty_python_semantic/resources/mdtest/attributes.md @@ -1220,7 +1220,7 @@ A.X = 100 ### Attribute only available on one element ```py -from knot_extensions import Intersection +from ty_extensions import Intersection class A: x: int = 1 @@ -1242,7 +1242,7 @@ def _(a_and_b: Intersection[type[A], type[B]]): ### Attribute available on both elements ```py -from knot_extensions import Intersection +from ty_extensions import Intersection class P: ... class Q: ... @@ -1267,7 +1267,7 @@ def _(a_and_b: Intersection[type[A], type[B]]): ### Possible unboundness ```py -from knot_extensions import Intersection +from ty_extensions import Intersection class P: ... class Q: ... @@ -1355,7 +1355,7 @@ def _(flag: bool): ### Intersection of implicit instance attributes ```py -from knot_extensions import Intersection +from ty_extensions import Intersection class P: ... class Q: ... diff --git a/crates/red_knot_python_semantic/resources/mdtest/binary/booleans.md b/crates/ty_python_semantic/resources/mdtest/binary/booleans.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/binary/booleans.md rename to crates/ty_python_semantic/resources/mdtest/binary/booleans.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/binary/classes.md b/crates/ty_python_semantic/resources/mdtest/binary/classes.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/binary/classes.md rename to crates/ty_python_semantic/resources/mdtest/binary/classes.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/binary/custom.md b/crates/ty_python_semantic/resources/mdtest/binary/custom.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/binary/custom.md rename to crates/ty_python_semantic/resources/mdtest/binary/custom.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/binary/instances.md b/crates/ty_python_semantic/resources/mdtest/binary/instances.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/binary/instances.md rename to crates/ty_python_semantic/resources/mdtest/binary/instances.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/binary/integers.md b/crates/ty_python_semantic/resources/mdtest/binary/integers.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/binary/integers.md rename to crates/ty_python_semantic/resources/mdtest/binary/integers.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/binary/tuples.md b/crates/ty_python_semantic/resources/mdtest/binary/tuples.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/binary/tuples.md rename to crates/ty_python_semantic/resources/mdtest/binary/tuples.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/binary/unions.md b/crates/ty_python_semantic/resources/mdtest/binary/unions.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/binary/unions.md rename to crates/ty_python_semantic/resources/mdtest/binary/unions.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/boolean/short_circuit.md b/crates/ty_python_semantic/resources/mdtest/boolean/short_circuit.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/boolean/short_circuit.md rename to crates/ty_python_semantic/resources/mdtest/boolean/short_circuit.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/boundness_declaredness/public.md b/crates/ty_python_semantic/resources/mdtest/boundness_declaredness/public.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/boundness_declaredness/public.md rename to crates/ty_python_semantic/resources/mdtest/boundness_declaredness/public.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/call/annotation.md b/crates/ty_python_semantic/resources/mdtest/call/annotation.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/call/annotation.md rename to crates/ty_python_semantic/resources/mdtest/call/annotation.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/call/builtins.md b/crates/ty_python_semantic/resources/mdtest/call/builtins.md similarity index 94% rename from crates/red_knot_python_semantic/resources/mdtest/call/builtins.md rename to crates/ty_python_semantic/resources/mdtest/call/builtins.md index a7b9935ee6..a58162a15a 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/call/builtins.md +++ b/crates/ty_python_semantic/resources/mdtest/call/builtins.md @@ -16,8 +16,8 @@ bool(NotBool()) ## Calls to `type()` A single-argument call to `type()` returns an object that has the argument's meta-type. (This is -tested more extensively in `crates/red_knot_python_semantic/resources/mdtest/attributes.md`, -alongside the tests for the `__class__` attribute.) +tested more extensively in `crates/ty_python_semantic/resources/mdtest/attributes.md`, alongside the +tests for the `__class__` attribute.) ```py reveal_type(type(1)) # revealed: Literal[int] diff --git a/crates/red_knot_python_semantic/resources/mdtest/call/callable_instance.md b/crates/ty_python_semantic/resources/mdtest/call/callable_instance.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/call/callable_instance.md rename to crates/ty_python_semantic/resources/mdtest/call/callable_instance.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/call/constructor.md b/crates/ty_python_semantic/resources/mdtest/call/constructor.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/call/constructor.md rename to crates/ty_python_semantic/resources/mdtest/call/constructor.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/call/dunder.md b/crates/ty_python_semantic/resources/mdtest/call/dunder.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/call/dunder.md rename to crates/ty_python_semantic/resources/mdtest/call/dunder.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/call/function.md b/crates/ty_python_semantic/resources/mdtest/call/function.md similarity index 98% rename from crates/red_knot_python_semantic/resources/mdtest/call/function.md rename to crates/ty_python_semantic/resources/mdtest/call/function.md index 54c35384c8..5a56f6c58d 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/call/function.md +++ b/crates/ty_python_semantic/resources/mdtest/call/function.md @@ -291,7 +291,7 @@ reveal_type(1, 2) ### `static_assert` ```py -from knot_extensions import static_assert +from ty_extensions import static_assert # error: [missing-argument] "No argument provided for required parameter `condition` of function `static_assert`" static_assert() @@ -313,7 +313,7 @@ len([], 1) ### Type API predicates ```py -from knot_extensions import is_subtype_of, is_fully_static +from ty_extensions import is_subtype_of, is_fully_static # error: [missing-argument] is_subtype_of() diff --git a/crates/red_knot_python_semantic/resources/mdtest/call/getattr_static.md b/crates/ty_python_semantic/resources/mdtest/call/getattr_static.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/call/getattr_static.md rename to crates/ty_python_semantic/resources/mdtest/call/getattr_static.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/call/invalid_syntax.md b/crates/ty_python_semantic/resources/mdtest/call/invalid_syntax.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/call/invalid_syntax.md rename to crates/ty_python_semantic/resources/mdtest/call/invalid_syntax.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/call/methods.md b/crates/ty_python_semantic/resources/mdtest/call/methods.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/call/methods.md rename to crates/ty_python_semantic/resources/mdtest/call/methods.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/call/never.md b/crates/ty_python_semantic/resources/mdtest/call/never.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/call/never.md rename to crates/ty_python_semantic/resources/mdtest/call/never.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/call/str_startswith.md b/crates/ty_python_semantic/resources/mdtest/call/str_startswith.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/call/str_startswith.md rename to crates/ty_python_semantic/resources/mdtest/call/str_startswith.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/call/subclass_of.md b/crates/ty_python_semantic/resources/mdtest/call/subclass_of.md similarity index 97% rename from crates/red_knot_python_semantic/resources/mdtest/call/subclass_of.md rename to crates/ty_python_semantic/resources/mdtest/call/subclass_of.md index 9fe47b9b6c..696d578d84 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/call/subclass_of.md +++ b/crates/ty_python_semantic/resources/mdtest/call/subclass_of.md @@ -32,7 +32,7 @@ def _(subclass_of_c: type[C]): ```py from typing import Any -from knot_extensions import Unknown +from ty_extensions import Unknown def _(subclass_of_any: type[Any], subclass_of_unknown: type[Unknown]): reveal_type(subclass_of_any()) # revealed: Any diff --git a/crates/red_knot_python_semantic/resources/mdtest/call/union.md b/crates/ty_python_semantic/resources/mdtest/call/union.md similarity index 97% rename from crates/red_knot_python_semantic/resources/mdtest/call/union.md rename to crates/ty_python_semantic/resources/mdtest/call/union.md index eef65c4557..8c34c83bb8 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/call/union.md +++ b/crates/ty_python_semantic/resources/mdtest/call/union.md @@ -166,7 +166,7 @@ def _(flag: bool): ```py from typing import Literal -from knot_extensions import Not, AlwaysFalsy, static_assert, is_subtype_of, is_assignable_to +from ty_extensions import Not, AlwaysFalsy, static_assert, is_subtype_of, is_assignable_to static_assert(is_subtype_of(Literal["a", ""], Literal["a", ""] | Not[AlwaysFalsy])) static_assert(is_subtype_of(Not[AlwaysFalsy], Literal["", "a"] | Not[AlwaysFalsy])) @@ -203,7 +203,7 @@ def _( ## Cannot use an argument as both a value and a type form ```py -from knot_extensions import is_fully_static +from ty_extensions import is_fully_static def _(flag: bool): if flag: @@ -246,7 +246,7 @@ If two types are gradually equivalent, we can keep just one of them in a union: ```py from typing import Any, Union -from knot_extensions import Intersection, Not +from ty_extensions import Intersection, Not def _(x: Union[Intersection[Any, Not[int]], Intersection[Any, Not[int]]]): reveal_type(x) # revealed: Any & ~int diff --git a/crates/red_knot_python_semantic/resources/mdtest/class/super.md b/crates/ty_python_semantic/resources/mdtest/class/super.md similarity index 99% rename from crates/red_knot_python_semantic/resources/mdtest/class/super.md rename to crates/ty_python_semantic/resources/mdtest/class/super.md index 5c5ca3a063..5ec8d09af1 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/class/super.md +++ b/crates/ty_python_semantic/resources/mdtest/class/super.md @@ -271,7 +271,7 @@ python-version = "3.12" ``` ```py -from knot_extensions import TypeOf, static_assert, is_subtype_of +from ty_extensions import TypeOf, static_assert, is_subtype_of class A[T]: def f(self, a: T) -> T: diff --git a/crates/red_knot_python_semantic/resources/mdtest/comparison/byte_literals.md b/crates/ty_python_semantic/resources/mdtest/comparison/byte_literals.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/comparison/byte_literals.md rename to crates/ty_python_semantic/resources/mdtest/comparison/byte_literals.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/comparison/identity.md b/crates/ty_python_semantic/resources/mdtest/comparison/identity.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/comparison/identity.md rename to crates/ty_python_semantic/resources/mdtest/comparison/identity.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/comparison/instances/membership_test.md b/crates/ty_python_semantic/resources/mdtest/comparison/instances/membership_test.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/comparison/instances/membership_test.md rename to crates/ty_python_semantic/resources/mdtest/comparison/instances/membership_test.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/comparison/instances/rich_comparison.md b/crates/ty_python_semantic/resources/mdtest/comparison/instances/rich_comparison.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/comparison/instances/rich_comparison.md rename to crates/ty_python_semantic/resources/mdtest/comparison/instances/rich_comparison.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/comparison/integers.md b/crates/ty_python_semantic/resources/mdtest/comparison/integers.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/comparison/integers.md rename to crates/ty_python_semantic/resources/mdtest/comparison/integers.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/comparison/intersections.md b/crates/ty_python_semantic/resources/mdtest/comparison/intersections.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/comparison/intersections.md rename to crates/ty_python_semantic/resources/mdtest/comparison/intersections.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/comparison/non_bool_returns.md b/crates/ty_python_semantic/resources/mdtest/comparison/non_bool_returns.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/comparison/non_bool_returns.md rename to crates/ty_python_semantic/resources/mdtest/comparison/non_bool_returns.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/comparison/strings.md b/crates/ty_python_semantic/resources/mdtest/comparison/strings.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/comparison/strings.md rename to crates/ty_python_semantic/resources/mdtest/comparison/strings.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/comparison/tuples.md b/crates/ty_python_semantic/resources/mdtest/comparison/tuples.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/comparison/tuples.md rename to crates/ty_python_semantic/resources/mdtest/comparison/tuples.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/comparison/unions.md b/crates/ty_python_semantic/resources/mdtest/comparison/unions.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/comparison/unions.md rename to crates/ty_python_semantic/resources/mdtest/comparison/unions.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/comparison/unsupported.md b/crates/ty_python_semantic/resources/mdtest/comparison/unsupported.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/comparison/unsupported.md rename to crates/ty_python_semantic/resources/mdtest/comparison/unsupported.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/comprehensions/basic.md b/crates/ty_python_semantic/resources/mdtest/comprehensions/basic.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/comprehensions/basic.md rename to crates/ty_python_semantic/resources/mdtest/comprehensions/basic.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/comprehensions/invalid_syntax.md b/crates/ty_python_semantic/resources/mdtest/comprehensions/invalid_syntax.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/comprehensions/invalid_syntax.md rename to crates/ty_python_semantic/resources/mdtest/comprehensions/invalid_syntax.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/conditional/if_expression.md b/crates/ty_python_semantic/resources/mdtest/conditional/if_expression.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/conditional/if_expression.md rename to crates/ty_python_semantic/resources/mdtest/conditional/if_expression.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/conditional/if_statement.md b/crates/ty_python_semantic/resources/mdtest/conditional/if_statement.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/conditional/if_statement.md rename to crates/ty_python_semantic/resources/mdtest/conditional/if_statement.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/conditional/match.md b/crates/ty_python_semantic/resources/mdtest/conditional/match.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/conditional/match.md rename to crates/ty_python_semantic/resources/mdtest/conditional/match.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/dataclass_transform.md b/crates/ty_python_semantic/resources/mdtest/dataclass_transform.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/dataclass_transform.md rename to crates/ty_python_semantic/resources/mdtest/dataclass_transform.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/dataclasses.md b/crates/ty_python_semantic/resources/mdtest/dataclasses.md similarity index 99% rename from crates/red_knot_python_semantic/resources/mdtest/dataclasses.md rename to crates/ty_python_semantic/resources/mdtest/dataclasses.md index 0f23feea9f..7d8c1edbdb 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/dataclasses.md +++ b/crates/ty_python_semantic/resources/mdtest/dataclasses.md @@ -170,7 +170,7 @@ But if there is a variable annotation with a function or class literal type, the `__init__` will include this field: ```py -from knot_extensions import TypeOf +from ty_extensions import TypeOf class SomeClass: ... diff --git a/crates/red_knot_python_semantic/resources/mdtest/declaration/error.md b/crates/ty_python_semantic/resources/mdtest/declaration/error.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/declaration/error.md rename to crates/ty_python_semantic/resources/mdtest/declaration/error.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/decorators.md b/crates/ty_python_semantic/resources/mdtest/decorators.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/decorators.md rename to crates/ty_python_semantic/resources/mdtest/decorators.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/descriptor_protocol.md b/crates/ty_python_semantic/resources/mdtest/descriptor_protocol.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/descriptor_protocol.md rename to crates/ty_python_semantic/resources/mdtest/descriptor_protocol.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/diagnostics/attribute_assignment.md b/crates/ty_python_semantic/resources/mdtest/diagnostics/attribute_assignment.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/diagnostics/attribute_assignment.md rename to crates/ty_python_semantic/resources/mdtest/diagnostics/attribute_assignment.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md b/crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md rename to crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/diagnostics/no_matching_overload.md b/crates/ty_python_semantic/resources/mdtest/diagnostics/no_matching_overload.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/diagnostics/no_matching_overload.md rename to crates/ty_python_semantic/resources/mdtest/diagnostics/no_matching_overload.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/diagnostics/semantic_syntax_errors.md b/crates/ty_python_semantic/resources/mdtest/diagnostics/semantic_syntax_errors.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/diagnostics/semantic_syntax_errors.md rename to crates/ty_python_semantic/resources/mdtest/diagnostics/semantic_syntax_errors.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/diagnostics/shadowing.md b/crates/ty_python_semantic/resources/mdtest/diagnostics/shadowing.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/diagnostics/shadowing.md rename to crates/ty_python_semantic/resources/mdtest/diagnostics/shadowing.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/diagnostics/unpacking.md b/crates/ty_python_semantic/resources/mdtest/diagnostics/unpacking.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/diagnostics/unpacking.md rename to crates/ty_python_semantic/resources/mdtest/diagnostics/unpacking.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/diagnostics/unresolved_import.md b/crates/ty_python_semantic/resources/mdtest/diagnostics/unresolved_import.md similarity index 91% rename from crates/red_knot_python_semantic/resources/mdtest/diagnostics/unresolved_import.md rename to crates/ty_python_semantic/resources/mdtest/diagnostics/unresolved_import.md index 059cb4e5e9..c07a3a2067 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/diagnostics/unresolved_import.md +++ b/crates/ty_python_semantic/resources/mdtest/diagnostics/unresolved_import.md @@ -40,8 +40,8 @@ stat = add(10, 15) ## Using `from` with an unknown current module -This is another case handled separately in Red Knot, where a `.` provokes relative module name -resolution, but where the module name is not resolvable. +This is another case handled separately in ty, where a `.` provokes relative module name resolution, +but where the module name is not resolvable. ```py from .does_not_exist import add # error: [unresolved-import] diff --git a/crates/red_knot_python_semantic/resources/mdtest/diagnostics/unsupported_bool_conversion.md b/crates/ty_python_semantic/resources/mdtest/diagnostics/unsupported_bool_conversion.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/diagnostics/unsupported_bool_conversion.md rename to crates/ty_python_semantic/resources/mdtest/diagnostics/unsupported_bool_conversion.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/diagnostics/version_related_syntax_errors.md b/crates/ty_python_semantic/resources/mdtest/diagnostics/version_related_syntax_errors.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/diagnostics/version_related_syntax_errors.md rename to crates/ty_python_semantic/resources/mdtest/diagnostics/version_related_syntax_errors.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/directives/assert_never.md b/crates/ty_python_semantic/resources/mdtest/directives/assert_never.md similarity index 98% rename from crates/red_knot_python_semantic/resources/mdtest/directives/assert_never.md rename to crates/ty_python_semantic/resources/mdtest/directives/assert_never.md index 712fbad35c..1866515a7b 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/directives/assert_never.md +++ b/crates/ty_python_semantic/resources/mdtest/directives/assert_never.md @@ -7,7 +7,7 @@ ```py from typing_extensions import assert_never, Never, Any -from knot_extensions import Unknown +from ty_extensions import Unknown def _(never: Never, any_: Any, unknown: Unknown, flag: bool): assert_never(never) # fine diff --git a/crates/red_knot_python_semantic/resources/mdtest/directives/assert_type.md b/crates/ty_python_semantic/resources/mdtest/directives/assert_type.md similarity index 96% rename from crates/red_knot_python_semantic/resources/mdtest/directives/assert_type.md rename to crates/ty_python_semantic/resources/mdtest/directives/assert_type.md index af0291493d..336e82e0ee 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/directives/assert_type.md +++ b/crates/ty_python_semantic/resources/mdtest/directives/assert_type.md @@ -55,7 +55,7 @@ def _(a: type[int]): from typing import Any from typing_extensions import Literal, assert_type -from knot_extensions import Unknown +from ty_extensions import Unknown # Any and Unknown are considered equivalent def _(a: Unknown, b: Any): @@ -80,7 +80,7 @@ Tuple types with the same elements are the same. ```py from typing_extensions import Any, assert_type -from knot_extensions import Unknown +from ty_extensions import Unknown def _(a: tuple[int, str, bytes]): assert_type(a, tuple[int, str, bytes]) # fine @@ -122,7 +122,7 @@ regardless of order. ```py from typing_extensions import assert_type -from knot_extensions import Intersection, Not +from ty_extensions import Intersection, Not class A: ... class B: ... diff --git a/crates/red_knot_python_semantic/resources/mdtest/directives/cast.md b/crates/ty_python_semantic/resources/mdtest/directives/cast.md similarity index 81% rename from crates/red_knot_python_semantic/resources/mdtest/directives/cast.md rename to crates/ty_python_semantic/resources/mdtest/directives/cast.md index 1cfcf5c1a5..9731d4cb37 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/directives/cast.md +++ b/crates/ty_python_semantic/resources/mdtest/directives/cast.md @@ -51,13 +51,13 @@ def f(x: Callable[[dict[str, int]], None], y: tuple[dict[str, int]]): ``` A cast from `Todo` or `Unknown` to `Any` is not considered a "redundant cast": even if these are -understood as gradually equivalent types by red-knot, they are understood as different types by -human readers of red-knot's output. For `Unknown` in particular, we may consider it differently in -the context of some opt-in diagnostics, as it indicates that the gradual type has come about due to -an invalid annotation, missing annotation or missing type argument somewhere. +understood as gradually equivalent types by ty, they are understood as different types by human +readers of ty's output. For `Unknown` in particular, we may consider it differently in the context +of some opt-in diagnostics, as it indicates that the gradual type has come about due to an invalid +annotation, missing annotation or missing type argument somewhere. ```py -from knot_extensions import Unknown +from ty_extensions import Unknown def f(x: Any, y: Unknown, z: Any | str | int): a = cast(dict[str, Any], x) diff --git a/crates/red_knot_python_semantic/resources/mdtest/doc/README.md b/crates/ty_python_semantic/resources/mdtest/doc/README.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/doc/README.md rename to crates/ty_python_semantic/resources/mdtest/doc/README.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/doc/public_type_undeclared_symbols.md b/crates/ty_python_semantic/resources/mdtest/doc/public_type_undeclared_symbols.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/doc/public_type_undeclared_symbols.md rename to crates/ty_python_semantic/resources/mdtest/doc/public_type_undeclared_symbols.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/exception/basic.md b/crates/ty_python_semantic/resources/mdtest/exception/basic.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/exception/basic.md rename to crates/ty_python_semantic/resources/mdtest/exception/basic.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/exception/control_flow.md b/crates/ty_python_semantic/resources/mdtest/exception/control_flow.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/exception/control_flow.md rename to crates/ty_python_semantic/resources/mdtest/exception/control_flow.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/exception/except_star.md b/crates/ty_python_semantic/resources/mdtest/exception/except_star.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/exception/except_star.md rename to crates/ty_python_semantic/resources/mdtest/exception/except_star.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/exception/invalid_syntax.md b/crates/ty_python_semantic/resources/mdtest/exception/invalid_syntax.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/exception/invalid_syntax.md rename to crates/ty_python_semantic/resources/mdtest/exception/invalid_syntax.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/expression/assert.md b/crates/ty_python_semantic/resources/mdtest/expression/assert.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/expression/assert.md rename to crates/ty_python_semantic/resources/mdtest/expression/assert.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/expression/attribute.md b/crates/ty_python_semantic/resources/mdtest/expression/attribute.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/expression/attribute.md rename to crates/ty_python_semantic/resources/mdtest/expression/attribute.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/expression/boolean.md b/crates/ty_python_semantic/resources/mdtest/expression/boolean.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/expression/boolean.md rename to crates/ty_python_semantic/resources/mdtest/expression/boolean.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/expression/if.md b/crates/ty_python_semantic/resources/mdtest/expression/if.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/expression/if.md rename to crates/ty_python_semantic/resources/mdtest/expression/if.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/expression/lambda.md b/crates/ty_python_semantic/resources/mdtest/expression/lambda.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/expression/lambda.md rename to crates/ty_python_semantic/resources/mdtest/expression/lambda.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/expression/len.md b/crates/ty_python_semantic/resources/mdtest/expression/len.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/expression/len.md rename to crates/ty_python_semantic/resources/mdtest/expression/len.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/final.md b/crates/ty_python_semantic/resources/mdtest/final.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/final.md rename to crates/ty_python_semantic/resources/mdtest/final.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/function/parameters.md b/crates/ty_python_semantic/resources/mdtest/function/parameters.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/function/parameters.md rename to crates/ty_python_semantic/resources/mdtest/function/parameters.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/function/return_type.md b/crates/ty_python_semantic/resources/mdtest/function/return_type.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/function/return_type.md rename to crates/ty_python_semantic/resources/mdtest/function/return_type.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/generics/builtins.md b/crates/ty_python_semantic/resources/mdtest/generics/builtins.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/generics/builtins.md rename to crates/ty_python_semantic/resources/mdtest/generics/builtins.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/generics/legacy/classes.md b/crates/ty_python_semantic/resources/mdtest/generics/legacy/classes.md similarity index 99% rename from crates/red_knot_python_semantic/resources/mdtest/generics/legacy/classes.md rename to crates/ty_python_semantic/resources/mdtest/generics/legacy/classes.md index 935aa2e7d9..cecf23de0a 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/generics/legacy/classes.md +++ b/crates/ty_python_semantic/resources/mdtest/generics/legacy/classes.md @@ -6,7 +6,7 @@ At its simplest, to define a generic class using the legacy syntax, you inherit `typing.Generic` special form, which is "specialized" with the generic class's type variables. ```py -from knot_extensions import generic_context +from ty_extensions import generic_context from typing import Generic, TypeVar T = TypeVar("T") diff --git a/crates/red_knot_python_semantic/resources/mdtest/generics/legacy/functions.md b/crates/ty_python_semantic/resources/mdtest/generics/legacy/functions.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/generics/legacy/functions.md rename to crates/ty_python_semantic/resources/mdtest/generics/legacy/functions.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/generics/legacy/variables.md b/crates/ty_python_semantic/resources/mdtest/generics/legacy/variables.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/generics/legacy/variables.md rename to crates/ty_python_semantic/resources/mdtest/generics/legacy/variables.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/generics/pep695/classes.md b/crates/ty_python_semantic/resources/mdtest/generics/pep695/classes.md similarity index 99% rename from crates/red_knot_python_semantic/resources/mdtest/generics/pep695/classes.md rename to crates/ty_python_semantic/resources/mdtest/generics/pep695/classes.md index 400f4dc8d4..948ec47f44 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/generics/pep695/classes.md +++ b/crates/ty_python_semantic/resources/mdtest/generics/pep695/classes.md @@ -11,7 +11,7 @@ At its simplest, to define a generic class using PEP 695 syntax, you add a list the class name. ```py -from knot_extensions import generic_context +from ty_extensions import generic_context class SingleTypevar[T]: ... class MultipleTypevars[T, S]: ... diff --git a/crates/red_knot_python_semantic/resources/mdtest/generics/pep695/functions.md b/crates/ty_python_semantic/resources/mdtest/generics/pep695/functions.md similarity index 99% rename from crates/red_knot_python_semantic/resources/mdtest/generics/pep695/functions.md rename to crates/ty_python_semantic/resources/mdtest/generics/pep695/functions.md index d09049544f..ffd208920c 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/generics/pep695/functions.md +++ b/crates/ty_python_semantic/resources/mdtest/generics/pep695/functions.md @@ -239,7 +239,7 @@ Protocol types can be used as TypeVar bounds, just like nominal types. ```py from typing import Any, Protocol -from knot_extensions import static_assert, is_assignable_to +from ty_extensions import static_assert, is_assignable_to class SupportsClose(Protocol): def close(self) -> None: ... diff --git a/crates/red_knot_python_semantic/resources/mdtest/generics/pep695/variables.md b/crates/ty_python_semantic/resources/mdtest/generics/pep695/variables.md similarity index 98% rename from crates/red_knot_python_semantic/resources/mdtest/generics/pep695/variables.md rename to crates/ty_python_semantic/resources/mdtest/generics/pep695/variables.md index 67a4fdc4f0..2c84f02c95 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/generics/pep695/variables.md +++ b/crates/ty_python_semantic/resources/mdtest/generics/pep695/variables.md @@ -102,7 +102,7 @@ is similar to how you can assign an expression whose type is not fully static to is.) ```py -from knot_extensions import is_fully_static, static_assert +from ty_extensions import is_fully_static, static_assert from typing import Any def unbounded_unconstrained[T](t: T) -> None: @@ -133,7 +133,7 @@ specialization. Thus, the typevar is a subtype of itself and of `object`, but no (including other typevars). ```py -from knot_extensions import is_assignable_to, is_subtype_of, static_assert +from ty_extensions import is_assignable_to, is_subtype_of, static_assert class Super: ... class Base(Super): ... @@ -233,7 +233,7 @@ the constraints individually. None of the constraints are subtypes of the typeva intersection of all of its constraints is a subtype of the typevar. ```py -from knot_extensions import Intersection +from ty_extensions import Intersection def constrained[T: (Base, Unrelated)](t: T) -> None: static_assert(not is_assignable_to(T, Super)) @@ -329,7 +329,7 @@ An unbounded, unconstrained typevar is not a singleton, because it can be specia non-singleton type. ```py -from knot_extensions import is_singleton, is_single_valued, static_assert +from ty_extensions import is_singleton, is_single_valued, static_assert def unbounded_unconstrained[T](t: T) -> None: static_assert(not is_singleton(T)) @@ -443,7 +443,7 @@ The intersection of an unbounded unconstrained typevar with any other type canno since there is no guarantee what type the typevar will be specialized to. ```py -from knot_extensions import Intersection +from ty_extensions import Intersection from typing import Any class Super: ... @@ -530,7 +530,7 @@ We can simplify the intersection similarly when removing a type from a constrain this is modeled internally as an intersection with a negation. ```py -from knot_extensions import Not +from ty_extensions import Not def remove_constraint[T: (int, str, bool)](t: T) -> None: def _(x: Intersection[T, Not[int]]) -> None: @@ -557,7 +557,7 @@ The intersection of a typevar with any other type is assignable to (and if fully of) itself. ```py -from knot_extensions import is_assignable_to, is_subtype_of, static_assert, Not +from ty_extensions import is_assignable_to, is_subtype_of, static_assert, Not def intersection_is_assignable[T](t: T) -> None: static_assert(is_assignable_to(Intersection[T, None], T)) diff --git a/crates/red_knot_python_semantic/resources/mdtest/generics/pep695/variance.md b/crates/ty_python_semantic/resources/mdtest/generics/pep695/variance.md similarity index 95% rename from crates/red_knot_python_semantic/resources/mdtest/generics/pep695/variance.md rename to crates/ty_python_semantic/resources/mdtest/generics/pep695/variance.md index 489e74a77e..65576d6c18 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/generics/pep695/variance.md +++ b/crates/ty_python_semantic/resources/mdtest/generics/pep695/variance.md @@ -22,7 +22,7 @@ Types that "produce" data on demand are covariant in their typevar. If you expec get from the sequence is a valid `int`. ```py -from knot_extensions import is_assignable_to, is_equivalent_to, is_gradual_equivalent_to, is_subtype_of, static_assert, Unknown +from ty_extensions import is_assignable_to, is_equivalent_to, is_gradual_equivalent_to, is_subtype_of, static_assert, Unknown from typing import Any class A: ... @@ -80,7 +80,7 @@ Types that "consume" data are contravariant in their typevar. If you expect a co that you pass into the consumer is a valid `int`. ```py -from knot_extensions import is_assignable_to, is_equivalent_to, is_gradual_equivalent_to, is_subtype_of, static_assert, Unknown +from ty_extensions import is_assignable_to, is_equivalent_to, is_gradual_equivalent_to, is_subtype_of, static_assert, Unknown from typing import Any class A: ... @@ -150,7 +150,7 @@ In the end, if you expect a mutable list, you must always be given a list of exa since we can't know in advance which of the allowed methods you'll want to use. ```py -from knot_extensions import is_assignable_to, is_equivalent_to, is_gradual_equivalent_to, is_subtype_of, static_assert, Unknown +from ty_extensions import is_assignable_to, is_equivalent_to, is_gradual_equivalent_to, is_subtype_of, static_assert, Unknown from typing import Any class A: ... @@ -206,7 +206,7 @@ at all. (If it did, it would have to be covariant, contravariant, or invariant, the typevar was used.) ```py -from knot_extensions import is_assignable_to, is_equivalent_to, is_gradual_equivalent_to, is_subtype_of, static_assert, Unknown +from ty_extensions import is_assignable_to, is_equivalent_to, is_gradual_equivalent_to, is_subtype_of, static_assert, Unknown from typing import Any class A: ... diff --git a/crates/red_knot_python_semantic/resources/mdtest/generics/scoping.md b/crates/ty_python_semantic/resources/mdtest/generics/scoping.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/generics/scoping.md rename to crates/ty_python_semantic/resources/mdtest/generics/scoping.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/import/basic.md b/crates/ty_python_semantic/resources/mdtest/import/basic.md similarity index 97% rename from crates/red_knot_python_semantic/resources/mdtest/import/basic.md rename to crates/ty_python_semantic/resources/mdtest/import/basic.md index df890bffda..48fa5fe4bd 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/import/basic.md +++ b/crates/ty_python_semantic/resources/mdtest/import/basic.md @@ -144,8 +144,8 @@ import b.foo # error: [unresolved-import] "Cannot resolve import `b.foo`" ## Long paths It's unlikely that a single module component is as long as in this example, but Windows treats paths -that are longer than 200 and something specially. This test ensures that Red Knot can handle those -paths gracefully. +that are longer than 200 and something specially. This test ensures that ty can handle those paths +gracefully. ```toml system = "os" diff --git a/crates/red_knot_python_semantic/resources/mdtest/import/builtins.md b/crates/ty_python_semantic/resources/mdtest/import/builtins.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/import/builtins.md rename to crates/ty_python_semantic/resources/mdtest/import/builtins.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/import/case_sensitive.md b/crates/ty_python_semantic/resources/mdtest/import/case_sensitive.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/import/case_sensitive.md rename to crates/ty_python_semantic/resources/mdtest/import/case_sensitive.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/import/conditional.md b/crates/ty_python_semantic/resources/mdtest/import/conditional.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/import/conditional.md rename to crates/ty_python_semantic/resources/mdtest/import/conditional.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/import/conflicts.md b/crates/ty_python_semantic/resources/mdtest/import/conflicts.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/import/conflicts.md rename to crates/ty_python_semantic/resources/mdtest/import/conflicts.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/import/conventions.md b/crates/ty_python_semantic/resources/mdtest/import/conventions.md similarity index 95% rename from crates/red_knot_python_semantic/resources/mdtest/import/conventions.md rename to crates/ty_python_semantic/resources/mdtest/import/conventions.md index bb7cf890b0..8781c38de1 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/import/conventions.md +++ b/crates/ty_python_semantic/resources/mdtest/import/conventions.md @@ -8,10 +8,9 @@ Reference: ## Builtins scope -When looking up for a name, red knot will fallback to using the builtins scope if the name is not -found in the global scope. The `builtins.pyi` file, that will be used to resolve any symbol in the -builtins scope, contains multiple symbols from other modules (e.g., `typing`) but those are not -re-exported. +When looking up for a name, ty will fallback to using the builtins scope if the name is not found in +the global scope. The `builtins.pyi` file, that will be used to resolve any symbol in the builtins +scope, contains multiple symbols from other modules (e.g., `typing`) but those are not re-exported. ```py # These symbols are being imported in `builtins.pyi` but shouldn't be considered as being diff --git a/crates/red_knot_python_semantic/resources/mdtest/import/errors.md b/crates/ty_python_semantic/resources/mdtest/import/errors.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/import/errors.md rename to crates/ty_python_semantic/resources/mdtest/import/errors.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/import/invalid_syntax.md b/crates/ty_python_semantic/resources/mdtest/import/invalid_syntax.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/import/invalid_syntax.md rename to crates/ty_python_semantic/resources/mdtest/import/invalid_syntax.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/import/relative.md b/crates/ty_python_semantic/resources/mdtest/import/relative.md similarity index 98% rename from crates/red_knot_python_semantic/resources/mdtest/import/relative.md rename to crates/ty_python_semantic/resources/mdtest/import/relative.md index a07ac61b9b..85e03404cc 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/import/relative.md +++ b/crates/ty_python_semantic/resources/mdtest/import/relative.md @@ -222,8 +222,8 @@ reveal_type(package.foo.X) # revealed: Unknown ## Relative imports at the top of a search path Relative imports at the top of a search path result in a runtime error: -`ImportError: attempted relative import with no known parent package`. That's why Red Knot should -disallow them. +`ImportError: attempted relative import with no known parent package`. That's why ty should disallow +them. `parser.py`: diff --git a/crates/red_knot_python_semantic/resources/mdtest/import/star.md b/crates/ty_python_semantic/resources/mdtest/import/star.md similarity index 99% rename from crates/red_knot_python_semantic/resources/mdtest/import/star.md rename to crates/ty_python_semantic/resources/mdtest/import/star.md index 49cf3bac00..0b91b3d35f 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/import/star.md +++ b/crates/ty_python_semantic/resources/mdtest/import/star.md @@ -485,7 +485,7 @@ reveal_type(s) # revealed: Unknown reveal_type(t) # revealed: Unknown # TODO: these should all reveal `Unknown | int` and should not emit errors. -# (We don't generally model elsewhere in red-knot that bindings from walruses +# (We don't generally model elsewhere in ty that bindings from walruses # "leak" from comprehension scopes into outer scopes, but we should.) # See https://github.com/astral-sh/ruff/issues/16954 # error: [unresolved-reference] @@ -1374,8 +1374,7 @@ from foo import * # error: [unresolved-import] "Cannot resolve import `foo`" ### Nested scope -A `*` import in a nested scope are always a syntax error. Red-knot does not infer any bindings from -them: +A `*` import in a nested scope are always a syntax error. Ty does not infer any bindings from them: `exporter.py`: diff --git a/crates/red_knot_python_semantic/resources/mdtest/import/stub_packages.md b/crates/ty_python_semantic/resources/mdtest/import/stub_packages.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/import/stub_packages.md rename to crates/ty_python_semantic/resources/mdtest/import/stub_packages.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/import/stubs.md b/crates/ty_python_semantic/resources/mdtest/import/stubs.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/import/stubs.md rename to crates/ty_python_semantic/resources/mdtest/import/stubs.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/import/tracking.md b/crates/ty_python_semantic/resources/mdtest/import/tracking.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/import/tracking.md rename to crates/ty_python_semantic/resources/mdtest/import/tracking.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/intersection_types.md b/crates/ty_python_semantic/resources/mdtest/intersection_types.md similarity index 93% rename from crates/red_knot_python_semantic/resources/mdtest/intersection_types.md rename to crates/ty_python_semantic/resources/mdtest/intersection_types.md index d2f409036c..4accdfe368 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/intersection_types.md +++ b/crates/ty_python_semantic/resources/mdtest/intersection_types.md @@ -8,7 +8,7 @@ intersection types (note that we display negative contributions at the end; the matter): ```py -from knot_extensions import Intersection, Not +from ty_extensions import Intersection, Not class P: ... class Q: ... @@ -35,7 +35,7 @@ classes. We use `P`, `Q`, `R`, … to denote types that are non-disjoint: ```py -from knot_extensions import static_assert, is_disjoint_from +from ty_extensions import static_assert, is_disjoint_from class P: ... class Q: ... @@ -56,7 +56,7 @@ We use `Literal[1]`, `Literal[2]`, … as examples of pairwise-disjoint types, a supertype of these: ```py -from knot_extensions import static_assert, is_disjoint_from, is_subtype_of +from ty_extensions import static_assert, is_disjoint_from, is_subtype_of from typing import Literal static_assert(is_disjoint_from(Literal[1], Literal[2])) @@ -73,7 +73,7 @@ static_assert(is_subtype_of(Literal[3], int)) Finally, we use `A <: B <: C` and `A <: B1`, `A <: B2` to denote hierarchies of (proper) subtypes: ```py -from knot_extensions import static_assert, is_subtype_of, is_disjoint_from +from ty_extensions import static_assert, is_subtype_of, is_disjoint_from class A: ... class B(A): ... @@ -111,7 +111,7 @@ If we have an intersection with a single element, we can simplify to that elemen show an intersection with a single negative contribution as just the negation of that element. ```py -from knot_extensions import Intersection, Not +from ty_extensions import Intersection, Not class P: ... @@ -128,7 +128,7 @@ def _( We eagerly flatten nested intersections types. ```py -from knot_extensions import Intersection, Not +from ty_extensions import Intersection, Not class P: ... class Q: ... @@ -179,7 +179,7 @@ We always normalize our representation to a _union of intersections_, so when we intersection_, we distribute the union over the respective elements: ```py -from knot_extensions import Intersection, Not +from ty_extensions import Intersection, Not class P: ... class Q: ... @@ -231,7 +231,7 @@ Distribution also applies to a negation operation. This is a manifestation of on [De Morgan's laws], namely `~(P | Q) = ~P & ~Q`: ```py -from knot_extensions import Not +from ty_extensions import Not from typing import Literal class P: ... @@ -251,7 +251,7 @@ def example_literals(i: Not[Literal[1, 2]]) -> None: The other of [De Morgan's laws], `~(P & Q) = ~P | ~Q`, also holds: ```py -from knot_extensions import Intersection, Not +from ty_extensions import Intersection, Not class P: ... class Q: ... @@ -272,7 +272,7 @@ def _( of the [complement laws] of set theory. ```py -from knot_extensions import Intersection, Not +from ty_extensions import Intersection, Not from typing_extensions import Never def _( @@ -290,7 +290,7 @@ in intersections, and can be eagerly simplified out. `object & P` is equivalent `object & ~P` is equivalent to `~P` for any type `P`. ```py -from knot_extensions import Intersection, Not, is_equivalent_to, static_assert +from ty_extensions import Intersection, Not, is_equivalent_to, static_assert class P: ... @@ -304,7 +304,7 @@ Continuing with more [complement laws], if we see both `P` and `~P` in an inters simplify to `Never`, even in the presence of other types: ```py -from knot_extensions import Intersection, Not +from ty_extensions import Intersection, Not from typing import Any class P: ... @@ -331,7 +331,7 @@ def _( Similarly, if we have both `P` and `~P` in a _union_, we can simplify that to `object`. ```py -from knot_extensions import Intersection, Not +from ty_extensions import Intersection, Not class P: ... class Q: ... @@ -353,7 +353,7 @@ def _( The final of the [complement laws] states that negating twice is equivalent to not negating at all: ```py -from knot_extensions import Not +from ty_extensions import Not class P: ... @@ -380,7 +380,7 @@ If we intersect with `Never`, we can simplify the whole intersection to `Never`, dynamic types involved: ```py -from knot_extensions import Intersection, Not +from ty_extensions import Intersection, Not from typing_extensions import Never, Any class P: ... @@ -405,7 +405,7 @@ def _( If we intersect disjoint types, we can simplify to `Never`, even in the presence of other types: ```py -from knot_extensions import Intersection, Not +from ty_extensions import Intersection, Not from typing import Literal, Any class P: ... @@ -443,7 +443,7 @@ If we intersect a type `X` with the negation `~Y` of a disjoint type `Y`, we can contribution `~Y`, as `~Y` must fully contain the positive contribution `X` as a subtype: ```py -from knot_extensions import Intersection, Not +from ty_extensions import Intersection, Not from typing import Literal def _( @@ -476,7 +476,7 @@ Subtypes are contained within their supertypes, so we can simplify intersections superfluous supertypes: ```py -from knot_extensions import Intersection, Not +from ty_extensions import Intersection, Not from typing import Any class A: ... @@ -535,7 +535,7 @@ def _( For negative contributions, this property is reversed. Here we can remove superfluous _subtypes_: ```py -from knot_extensions import Intersection, Not +from ty_extensions import Intersection, Not from typing import Any class A: ... @@ -594,7 +594,7 @@ def _( If there are multiple negative subtypes, all of them can be removed: ```py -from knot_extensions import Intersection, Not +from ty_extensions import Intersection, Not class A: ... class B1(A): ... @@ -622,7 +622,7 @@ When `A` is a supertype of `B`, its negation `~A` is disjoint from `B`, so we ca intersection to `Never`: ```py -from knot_extensions import Intersection, Not +from ty_extensions import Intersection, Not from typing import Any class A: ... @@ -662,7 +662,7 @@ Nonetheless, intersections of `AlwaysFalsy` or `AlwaysTruthy` with `bool` _can_ to the fact that `bool` is a `@final` class at runtime that cannot be subclassed. ```py -from knot_extensions import Intersection, Not, AlwaysTruthy, AlwaysFalsy +from ty_extensions import Intersection, Not, AlwaysTruthy, AlwaysFalsy from typing_extensions import Literal class P: ... @@ -709,7 +709,7 @@ simplified, due to the fact that a `LiteralString` inhabitant is known to have ` exactly `str` (and not a subclass of `str`): ```py -from knot_extensions import Intersection, Not, AlwaysTruthy, AlwaysFalsy, Unknown +from ty_extensions import Intersection, Not, AlwaysTruthy, AlwaysFalsy, Unknown from typing_extensions import LiteralString def f( @@ -742,7 +742,7 @@ This slightly strange-looking test is a regression test for a mistake that was n . ```py -from knot_extensions import AlwaysFalsy, Intersection, Unknown +from ty_extensions import AlwaysFalsy, Intersection, Unknown from typing_extensions import Literal def _(x: Intersection[str, Unknown, AlwaysFalsy, Literal[""]]): @@ -758,7 +758,7 @@ is still an unknown set of runtime values, so `~Any` is equivalent to `Any`. We simplify `~Any` to `Any` in intersections. The same applies to `Unknown`. ```py -from knot_extensions import Intersection, Not, Unknown +from ty_extensions import Intersection, Not, Unknown from typing_extensions import Any, Never class P: ... @@ -788,7 +788,7 @@ The intersection of an unknown set of runtime values with (another) unknown set still an unknown set of runtime values: ```py -from knot_extensions import Intersection, Not, Unknown +from ty_extensions import Intersection, Not, Unknown from typing_extensions import Any class P: ... @@ -823,7 +823,7 @@ of another unknown set of values is not necessarily empty, so we keep the positi ```py from typing import Any -from knot_extensions import Intersection, Not, Unknown +from ty_extensions import Intersection, Not, Unknown def any( i1: Intersection[Any, Not[Any]], @@ -846,7 +846,7 @@ Gradually-equivalent types can be simplified out of intersections: ```py from typing import Any -from knot_extensions import Intersection, Not, Unknown +from ty_extensions import Intersection, Not, Unknown def mixed( i1: Intersection[Any, Unknown], @@ -863,13 +863,13 @@ def mixed( ## Invalid ```py -from knot_extensions import Intersection, Not +from ty_extensions import Intersection, Not -# error: [invalid-type-form] "`knot_extensions.Intersection` requires at least one argument when used in a type expression" +# error: [invalid-type-form] "`ty_extensions.Intersection` requires at least one argument when used in a type expression" def f(x: Intersection) -> None: reveal_type(x) # revealed: Unknown -# error: [invalid-type-form] "`knot_extensions.Not` requires exactly one argument when used in a type expression" +# error: [invalid-type-form] "`ty_extensions.Not` requires exactly one argument when used in a type expression" def f(x: Not) -> None: reveal_type(x) # revealed: Unknown ``` diff --git a/crates/red_knot_python_semantic/resources/mdtest/invalid_syntax.md b/crates/ty_python_semantic/resources/mdtest/invalid_syntax.md similarity index 96% rename from crates/red_knot_python_semantic/resources/mdtest/invalid_syntax.md rename to crates/ty_python_semantic/resources/mdtest/invalid_syntax.md index 2de26eb1d3..cc90879401 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/invalid_syntax.md +++ b/crates/ty_python_semantic/resources/mdtest/invalid_syntax.md @@ -1,6 +1,6 @@ # Syntax errors -Test cases to ensure that red knot does not panic if there are syntax errors in the source code. +Test cases to ensure that ty does not panic if there are syntax errors in the source code. The parser cannot recover from certain syntax errors completely which is why the number of syntax errors could be more than expected in the following examples. For instance, if there's a keyword diff --git a/crates/red_knot_python_semantic/resources/mdtest/known_constants.md b/crates/ty_python_semantic/resources/mdtest/known_constants.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/known_constants.md rename to crates/ty_python_semantic/resources/mdtest/known_constants.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/literal/boolean.md b/crates/ty_python_semantic/resources/mdtest/literal/boolean.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/literal/boolean.md rename to crates/ty_python_semantic/resources/mdtest/literal/boolean.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/literal/bytes.md b/crates/ty_python_semantic/resources/mdtest/literal/bytes.md similarity index 77% rename from crates/red_knot_python_semantic/resources/mdtest/literal/bytes.md rename to crates/ty_python_semantic/resources/mdtest/literal/bytes.md index 0cf6222c53..391eff8ad5 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/literal/bytes.md +++ b/crates/ty_python_semantic/resources/mdtest/literal/bytes.md @@ -3,7 +3,7 @@ ## Simple ```py -reveal_type(b"red" b"knot") # revealed: Literal[b"redknot"] +reveal_type(b"t" b"y") # revealed: Literal[b"ty"] reveal_type(b"hello") # revealed: Literal[b"hello"] reveal_type(b"world" + b"!") # revealed: Literal[b"world!"] reveal_type(b"\xff\x00") # revealed: Literal[b"\xff\x00"] diff --git a/crates/red_knot_python_semantic/resources/mdtest/literal/collections/dictionary.md b/crates/ty_python_semantic/resources/mdtest/literal/collections/dictionary.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/literal/collections/dictionary.md rename to crates/ty_python_semantic/resources/mdtest/literal/collections/dictionary.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/literal/collections/list.md b/crates/ty_python_semantic/resources/mdtest/literal/collections/list.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/literal/collections/list.md rename to crates/ty_python_semantic/resources/mdtest/literal/collections/list.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/literal/collections/set.md b/crates/ty_python_semantic/resources/mdtest/literal/collections/set.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/literal/collections/set.md rename to crates/ty_python_semantic/resources/mdtest/literal/collections/set.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/literal/collections/tuple.md b/crates/ty_python_semantic/resources/mdtest/literal/collections/tuple.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/literal/collections/tuple.md rename to crates/ty_python_semantic/resources/mdtest/literal/collections/tuple.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/literal/complex.md b/crates/ty_python_semantic/resources/mdtest/literal/complex.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/literal/complex.md rename to crates/ty_python_semantic/resources/mdtest/literal/complex.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/literal/ellipsis.md b/crates/ty_python_semantic/resources/mdtest/literal/ellipsis.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/literal/ellipsis.md rename to crates/ty_python_semantic/resources/mdtest/literal/ellipsis.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/literal/f_string.md b/crates/ty_python_semantic/resources/mdtest/literal/f_string.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/literal/f_string.md rename to crates/ty_python_semantic/resources/mdtest/literal/f_string.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/literal/float.md b/crates/ty_python_semantic/resources/mdtest/literal/float.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/literal/float.md rename to crates/ty_python_semantic/resources/mdtest/literal/float.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/literal/integer.md b/crates/ty_python_semantic/resources/mdtest/literal/integer.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/literal/integer.md rename to crates/ty_python_semantic/resources/mdtest/literal/integer.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/literal/string.md b/crates/ty_python_semantic/resources/mdtest/literal/string.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/literal/string.md rename to crates/ty_python_semantic/resources/mdtest/literal/string.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/loops/async_for.md b/crates/ty_python_semantic/resources/mdtest/loops/async_for.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/loops/async_for.md rename to crates/ty_python_semantic/resources/mdtest/loops/async_for.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/loops/for.md b/crates/ty_python_semantic/resources/mdtest/loops/for.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/loops/for.md rename to crates/ty_python_semantic/resources/mdtest/loops/for.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/loops/iterators.md b/crates/ty_python_semantic/resources/mdtest/loops/iterators.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/loops/iterators.md rename to crates/ty_python_semantic/resources/mdtest/loops/iterators.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/loops/while_loop.md b/crates/ty_python_semantic/resources/mdtest/loops/while_loop.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/loops/while_loop.md rename to crates/ty_python_semantic/resources/mdtest/loops/while_loop.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/mdtest_config.md b/crates/ty_python_semantic/resources/mdtest/mdtest_config.md similarity index 90% rename from crates/red_knot_python_semantic/resources/mdtest/mdtest_config.md rename to crates/ty_python_semantic/resources/mdtest/mdtest_config.md index d028c7a84a..6db92ff321 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/mdtest_config.md +++ b/crates/ty_python_semantic/resources/mdtest/mdtest_config.md @@ -1,5 +1,5 @@ -This test makes sure that `red_knot_test` correctly parses the TOML configuration blocks and applies -the correct settings hierarchically. +This test makes sure that `ty_test` correctly parses the TOML configuration blocks and applies the +correct settings hierarchically. The following configuration will be attached to the *root* section (without any heading): diff --git a/crates/red_knot_python_semantic/resources/mdtest/mdtest_custom_typeshed.md b/crates/ty_python_semantic/resources/mdtest/mdtest_custom_typeshed.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/mdtest_custom_typeshed.md rename to crates/ty_python_semantic/resources/mdtest/mdtest_custom_typeshed.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/metaclass.md b/crates/ty_python_semantic/resources/mdtest/metaclass.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/metaclass.md rename to crates/ty_python_semantic/resources/mdtest/metaclass.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/mro.md b/crates/ty_python_semantic/resources/mdtest/mro.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/mro.md rename to crates/ty_python_semantic/resources/mdtest/mro.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/named_tuple.md b/crates/ty_python_semantic/resources/mdtest/named_tuple.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/named_tuple.md rename to crates/ty_python_semantic/resources/mdtest/named_tuple.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/narrow/assert.md b/crates/ty_python_semantic/resources/mdtest/narrow/assert.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/narrow/assert.md rename to crates/ty_python_semantic/resources/mdtest/narrow/assert.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/narrow/bool-call.md b/crates/ty_python_semantic/resources/mdtest/narrow/bool-call.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/narrow/bool-call.md rename to crates/ty_python_semantic/resources/mdtest/narrow/bool-call.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/narrow/boolean.md b/crates/ty_python_semantic/resources/mdtest/narrow/boolean.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/narrow/boolean.md rename to crates/ty_python_semantic/resources/mdtest/narrow/boolean.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/narrow/conditionals/boolean.md b/crates/ty_python_semantic/resources/mdtest/narrow/conditionals/boolean.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/narrow/conditionals/boolean.md rename to crates/ty_python_semantic/resources/mdtest/narrow/conditionals/boolean.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/narrow/conditionals/elif_else.md b/crates/ty_python_semantic/resources/mdtest/narrow/conditionals/elif_else.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/narrow/conditionals/elif_else.md rename to crates/ty_python_semantic/resources/mdtest/narrow/conditionals/elif_else.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/narrow/conditionals/eq.md b/crates/ty_python_semantic/resources/mdtest/narrow/conditionals/eq.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/narrow/conditionals/eq.md rename to crates/ty_python_semantic/resources/mdtest/narrow/conditionals/eq.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/narrow/conditionals/in.md b/crates/ty_python_semantic/resources/mdtest/narrow/conditionals/in.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/narrow/conditionals/in.md rename to crates/ty_python_semantic/resources/mdtest/narrow/conditionals/in.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/narrow/conditionals/is.md b/crates/ty_python_semantic/resources/mdtest/narrow/conditionals/is.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/narrow/conditionals/is.md rename to crates/ty_python_semantic/resources/mdtest/narrow/conditionals/is.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/narrow/conditionals/is_not.md b/crates/ty_python_semantic/resources/mdtest/narrow/conditionals/is_not.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/narrow/conditionals/is_not.md rename to crates/ty_python_semantic/resources/mdtest/narrow/conditionals/is_not.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/narrow/conditionals/nested.md b/crates/ty_python_semantic/resources/mdtest/narrow/conditionals/nested.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/narrow/conditionals/nested.md rename to crates/ty_python_semantic/resources/mdtest/narrow/conditionals/nested.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/narrow/conditionals/not.md b/crates/ty_python_semantic/resources/mdtest/narrow/conditionals/not.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/narrow/conditionals/not.md rename to crates/ty_python_semantic/resources/mdtest/narrow/conditionals/not.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/narrow/isinstance.md b/crates/ty_python_semantic/resources/mdtest/narrow/isinstance.md similarity index 98% rename from crates/red_knot_python_semantic/resources/mdtest/narrow/isinstance.md rename to crates/ty_python_semantic/resources/mdtest/narrow/isinstance.md index 1c4e05e678..6eb475715a 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/narrow/isinstance.md +++ b/crates/ty_python_semantic/resources/mdtest/narrow/isinstance.md @@ -181,7 +181,7 @@ def _(x: object, y: type[int]): We used to incorrectly infer `Literal` booleans for some of these. ```py -from knot_extensions import Not, Intersection, AlwaysTruthy, AlwaysFalsy +from ty_extensions import Not, Intersection, AlwaysTruthy, AlwaysFalsy class P: ... diff --git a/crates/red_knot_python_semantic/resources/mdtest/narrow/issubclass.md b/crates/ty_python_semantic/resources/mdtest/narrow/issubclass.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/narrow/issubclass.md rename to crates/ty_python_semantic/resources/mdtest/narrow/issubclass.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/narrow/match.md b/crates/ty_python_semantic/resources/mdtest/narrow/match.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/narrow/match.md rename to crates/ty_python_semantic/resources/mdtest/narrow/match.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/narrow/post_if_statement.md b/crates/ty_python_semantic/resources/mdtest/narrow/post_if_statement.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/narrow/post_if_statement.md rename to crates/ty_python_semantic/resources/mdtest/narrow/post_if_statement.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/narrow/truthiness.md b/crates/ty_python_semantic/resources/mdtest/narrow/truthiness.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/narrow/truthiness.md rename to crates/ty_python_semantic/resources/mdtest/narrow/truthiness.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/narrow/type.md b/crates/ty_python_semantic/resources/mdtest/narrow/type.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/narrow/type.md rename to crates/ty_python_semantic/resources/mdtest/narrow/type.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/narrow/while.md b/crates/ty_python_semantic/resources/mdtest/narrow/while.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/narrow/while.md rename to crates/ty_python_semantic/resources/mdtest/narrow/while.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/overloads.md b/crates/ty_python_semantic/resources/mdtest/overloads.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/overloads.md rename to crates/ty_python_semantic/resources/mdtest/overloads.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/pep695_type_aliases.md b/crates/ty_python_semantic/resources/mdtest/pep695_type_aliases.md similarity index 95% rename from crates/red_knot_python_semantic/resources/mdtest/pep695_type_aliases.md rename to crates/ty_python_semantic/resources/mdtest/pep695_type_aliases.md index 43a0cf6c6a..6f84dc5481 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/pep695_type_aliases.md +++ b/crates/ty_python_semantic/resources/mdtest/pep695_type_aliases.md @@ -79,7 +79,7 @@ reveal_type(ListOrSet.__type_params__) # revealed: @Todo(full tuple[...] suppor Two `TypeAliasType`s are distinct and disjoint, even if they refer to the same type ```py -from knot_extensions import static_assert, is_equivalent_to, is_disjoint_from, TypeOf +from ty_extensions import static_assert, is_equivalent_to, is_disjoint_from, TypeOf type Alias1 = int type Alias2 = int diff --git a/crates/red_knot_python_semantic/resources/mdtest/properties.md b/crates/ty_python_semantic/resources/mdtest/properties.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/properties.md rename to crates/ty_python_semantic/resources/mdtest/properties.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/protocols.md b/crates/ty_python_semantic/resources/mdtest/protocols.md similarity index 97% rename from crates/red_knot_python_semantic/resources/mdtest/protocols.md rename to crates/ty_python_semantic/resources/mdtest/protocols.md index cc3f8143f8..a2f11fa579 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/protocols.md +++ b/crates/ty_python_semantic/resources/mdtest/protocols.md @@ -193,7 +193,7 @@ of that protocol (more on that below). However, classes that explicitly inherit class are understood as subtypes of that protocol, the same as with nominal types: ```py -from knot_extensions import static_assert, is_subtype_of, is_assignable_to +from ty_extensions import static_assert, is_subtype_of, is_assignable_to static_assert(is_subtype_of(SubclassOfMyProtocol, MyProtocol)) static_assert(is_assignable_to(SubclassOfMyProtocol, MyProtocol)) @@ -253,7 +253,7 @@ reveal_type(issubclass(MyProtocol, Protocol)) # revealed: bool ```py import typing import typing_extensions -from knot_extensions import static_assert, is_equivalent_to, TypeOf +from ty_extensions import static_assert, is_equivalent_to, TypeOf static_assert(is_equivalent_to(TypeOf[typing.Protocol], TypeOf[typing_extensions.Protocol])) static_assert(is_equivalent_to(int | str | TypeOf[typing.Protocol], TypeOf[typing_extensions.Protocol] | str | int)) @@ -491,7 +491,7 @@ python-version = "3.12" ```py from typing import Protocol -from knot_extensions import static_assert, is_assignable_to, is_subtype_of +from ty_extensions import static_assert, is_assignable_to, is_subtype_of class HasX(Protocol): x: int @@ -631,7 +631,7 @@ def f(arg: HasXWithDefault): reveal_type(type(arg).x) # revealed: int ``` -Assignments in a class body of a protocol -- of any kind -- are not permitted by red-knot unless the +Assignments in a class body of a protocol -- of any kind -- are not permitted by ty unless the symbol being assigned to is also explicitly declared in the protocol's class body. Note that this is stricter validation of protocol members than many other type checkers currently apply (as of 2025/04/21). @@ -738,7 +738,7 @@ static_assert(is_subtype_of(object, UniversalSet)) Which means that `UniversalSet` here is in fact an equivalent type to `object`: ```py -from knot_extensions import is_equivalent_to +from ty_extensions import is_equivalent_to static_assert(is_equivalent_to(UniversalSet, object)) ``` @@ -789,7 +789,7 @@ different names: ```py from typing import Protocol -from knot_extensions import is_equivalent_to, static_assert +from ty_extensions import is_equivalent_to, static_assert class HasX(Protocol): x: int @@ -839,7 +839,7 @@ from both `X` and `Y`: ```py from typing import Protocol -from knot_extensions import Intersection, static_assert, is_equivalent_to +from ty_extensions import Intersection, static_assert, is_equivalent_to class HasX(Protocol): x: int @@ -869,7 +869,7 @@ that would lead to it satisfying `X`'s interface: ```py from typing import final -from knot_extensions import is_disjoint_from +from ty_extensions import is_disjoint_from class NotFinalNominal: ... @@ -902,7 +902,7 @@ x: int = 42 ```py import module from typing import Protocol -from knot_extensions import is_subtype_of, is_assignable_to, static_assert, TypeOf +from ty_extensions import is_subtype_of, is_assignable_to, static_assert, TypeOf class HasX(Protocol): x: int @@ -944,7 +944,7 @@ a readable `x` attribute must be accessible on any inhabitant of `ClassVarX`, an ```py from typing import ClassVar, Protocol -from knot_extensions import is_subtype_of, is_assignable_to, static_assert +from ty_extensions import is_subtype_of, is_assignable_to, static_assert class ClassVarXProto(Protocol): x: ClassVar[int] @@ -992,7 +992,7 @@ read/write property, a `Final` attribute, or a `ClassVar` attribute: ```py from typing import ClassVar, Final, Protocol -from knot_extensions import is_subtype_of, is_assignable_to, static_assert +from ty_extensions import is_subtype_of, is_assignable_to, static_assert class HasXProperty(Protocol): @property @@ -1098,7 +1098,7 @@ A protocol with a read/write property `x` is exactly equivalent to a protocol wi attribute `x`. Both are subtypes of a protocol with a read-only prooperty `x`: ```py -from knot_extensions import is_equivalent_to +from ty_extensions import is_equivalent_to class HasMutableXAttr(Protocol): x: int @@ -1358,7 +1358,7 @@ A protocol is only fully static if all of its members are fully static: ```py from typing import Protocol, Any -from knot_extensions import is_fully_static, static_assert +from ty_extensions import is_fully_static, static_assert class FullyStatic(Protocol): x: int @@ -1374,7 +1374,7 @@ Non-fully-static protocols do not participate in subtyping or equivalence, only gradual equivalence: ```py -from knot_extensions import is_subtype_of, is_assignable_to, is_equivalent_to, is_gradual_equivalent_to +from ty_extensions import is_subtype_of, is_assignable_to, is_equivalent_to, is_gradual_equivalent_to class NominalWithX: x: int = 42 @@ -1473,7 +1473,7 @@ right signature: ```py from typing import Callable -from knot_extensions import is_subtype_of, is_assignable_to, static_assert +from ty_extensions import is_subtype_of, is_assignable_to, static_assert static_assert(is_subtype_of(CallMeMaybe, Callable[[int], str])) static_assert(is_assignable_to(CallMeMaybe, Callable[[int], str])) @@ -1492,7 +1492,7 @@ signature implied by the `Callable` type is assignable to the signature of the ` specified by the protocol: ```py -from knot_extensions import TypeOf +from ty_extensions import TypeOf class Foo(Protocol): def __call__(self, x: int, /) -> str: ... @@ -1530,7 +1530,7 @@ worth it. Such cases should anyway be exceedingly rare and/or contrived. ```py from typing import Protocol, Callable -from knot_extensions import is_singleton, is_single_valued +from ty_extensions import is_singleton, is_single_valued class WeirdAndWacky(Protocol): @property diff --git a/crates/red_knot_python_semantic/resources/mdtest/regression/14334_diagnostics_in_wrong_file.md b/crates/ty_python_semantic/resources/mdtest/regression/14334_diagnostics_in_wrong_file.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/regression/14334_diagnostics_in_wrong_file.md rename to crates/ty_python_semantic/resources/mdtest/regression/14334_diagnostics_in_wrong_file.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/scopes/builtin.md b/crates/ty_python_semantic/resources/mdtest/scopes/builtin.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/scopes/builtin.md rename to crates/ty_python_semantic/resources/mdtest/scopes/builtin.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/scopes/eager.md b/crates/ty_python_semantic/resources/mdtest/scopes/eager.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/scopes/eager.md rename to crates/ty_python_semantic/resources/mdtest/scopes/eager.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/scopes/global.md b/crates/ty_python_semantic/resources/mdtest/scopes/global.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/scopes/global.md rename to crates/ty_python_semantic/resources/mdtest/scopes/global.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/scopes/moduletype_attrs.md b/crates/ty_python_semantic/resources/mdtest/scopes/moduletype_attrs.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/scopes/moduletype_attrs.md rename to crates/ty_python_semantic/resources/mdtest/scopes/moduletype_attrs.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/scopes/nonlocal.md b/crates/ty_python_semantic/resources/mdtest/scopes/nonlocal.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/scopes/nonlocal.md rename to crates/ty_python_semantic/resources/mdtest/scopes/nonlocal.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/scopes/unbound.md b/crates/ty_python_semantic/resources/mdtest/scopes/unbound.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/scopes/unbound.md rename to crates/ty_python_semantic/resources/mdtest/scopes/unbound.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/shadowing/class.md b/crates/ty_python_semantic/resources/mdtest/shadowing/class.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/shadowing/class.md rename to crates/ty_python_semantic/resources/mdtest/shadowing/class.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/shadowing/function.md b/crates/ty_python_semantic/resources/mdtest/shadowing/function.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/shadowing/function.md rename to crates/ty_python_semantic/resources/mdtest/shadowing/function.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/shadowing/variable_declaration.md b/crates/ty_python_semantic/resources/mdtest/shadowing/variable_declaration.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/shadowing/variable_declaration.md rename to crates/ty_python_semantic/resources/mdtest/shadowing/variable_declaration.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/slots.md b/crates/ty_python_semantic/resources/mdtest/slots.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/slots.md rename to crates/ty_python_semantic/resources/mdtest/slots.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Data_descriptors_-_Invalid_`__set__`_method_signature.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Data_descriptors_-_Invalid_`__set__`_method_signature.snap similarity index 87% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Data_descriptors_-_Invalid_`__set__`_method_signature.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Data_descriptors_-_Invalid_`__set__`_method_signature.snap index 29d179dfcd..60d36fee9e 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Data_descriptors_-_Invalid_`__set__`_method_signature.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Data_descriptors_-_Invalid_`__set__`_method_signature.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: attribute_assignment.md - Attribute assignment - Data descriptors - Invalid `__set__` method signature -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/attribute_assignment.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/attribute_assignment.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Data_descriptors_-_Invalid_argument_type.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Data_descriptors_-_Invalid_argument_type.snap similarity index 87% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Data_descriptors_-_Invalid_argument_type.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Data_descriptors_-_Invalid_argument_type.snap index b56d17edf7..c14f98d9e1 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Data_descriptors_-_Invalid_argument_type.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Data_descriptors_-_Invalid_argument_type.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: attribute_assignment.md - Attribute assignment - Data descriptors - Invalid argument type -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/attribute_assignment.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/attribute_assignment.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Instance_attributes_with_class-level_defaults.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Instance_attributes_with_class-level_defaults.snap similarity index 88% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Instance_attributes_with_class-level_defaults.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Instance_attributes_with_class-level_defaults.snap index 83bd2f0f12..2e9753c8ef 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Instance_attributes_with_class-level_defaults.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Instance_attributes_with_class-level_defaults.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: attribute_assignment.md - Attribute assignment - Instance attributes with class-level defaults -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/attribute_assignment.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/attribute_assignment.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Possibly-unbound_attributes.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Possibly-unbound_attributes.snap similarity index 87% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Possibly-unbound_attributes.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Possibly-unbound_attributes.snap index 19d1547e5a..088c2c3a82 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Possibly-unbound_attributes.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Possibly-unbound_attributes.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: attribute_assignment.md - Attribute assignment - Possibly-unbound attributes -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/attribute_assignment.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/attribute_assignment.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Pure_instance_attributes.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Pure_instance_attributes.snap similarity index 88% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Pure_instance_attributes.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Pure_instance_attributes.snap index 560e04c18f..8be4e61a07 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Pure_instance_attributes.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Pure_instance_attributes.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: attribute_assignment.md - Attribute assignment - Pure instance attributes -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/attribute_assignment.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/attribute_assignment.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Setting_attributes_on_union_types.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Setting_attributes_on_union_types.snap similarity index 88% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Setting_attributes_on_union_types.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Setting_attributes_on_union_types.snap index d1db352068..36d60e8ecb 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Setting_attributes_on_union_types.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Setting_attributes_on_union_types.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: attribute_assignment.md - Attribute assignment - Setting attributes on union types -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/attribute_assignment.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/attribute_assignment.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Unknown_attributes.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Unknown_attributes.snap similarity index 86% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Unknown_attributes.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Unknown_attributes.snap index 003bd123d3..5d85558448 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Unknown_attributes.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_Unknown_attributes.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: attribute_assignment.md - Attribute assignment - Unknown attributes -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/attribute_assignment.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/attribute_assignment.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_`ClassVar`s.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_`ClassVar`s.snap similarity index 87% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_`ClassVar`s.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_`ClassVar`s.snap index 61882d1faf..8912478ea6 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_`ClassVar`s.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/attribute_assignment.md_-_Attribute_assignment_-_`ClassVar`s.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: attribute_assignment.md - Attribute assignment - `ClassVar`s -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/attribute_assignment.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/attribute_assignment.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Unresolvable_module_import.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Unresolvable_module_import.snap similarity index 81% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Unresolvable_module_import.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Unresolvable_module_import.snap index 1301dfb6d0..ac235bc237 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Unresolvable_module_import.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Unresolvable_module_import.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: basic.md - Structures - Unresolvable module import -mdtest path: crates/red_knot_python_semantic/resources/mdtest/import/basic.md +mdtest path: crates/ty_python_semantic/resources/mdtest/import/basic.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Unresolvable_submodule_imports.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Unresolvable_submodule_imports.snap similarity index 89% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Unresolvable_submodule_imports.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Unresolvable_submodule_imports.snap index 3b1b2c4310..b6f94e9f1f 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Unresolvable_submodule_imports.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/basic.md_-_Structures_-_Unresolvable_submodule_imports.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: basic.md - Structures - Unresolvable submodule imports -mdtest path: crates/red_knot_python_semantic/resources/mdtest/import/basic.md +mdtest path: crates/ty_python_semantic/resources/mdtest/import/basic.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Bad_`__getitem__`_method.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Bad_`__getitem__`_method.snap similarity index 91% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Bad_`__getitem__`_method.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Bad_`__getitem__`_method.snap index 37f5cd5df0..780cb36c1f 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Bad_`__getitem__`_method.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Bad_`__getitem__`_method.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: for.md - For loops - Bad `__getitem__` method -mdtest path: crates/red_knot_python_semantic/resources/mdtest/loops/for.md +mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Invalid_iterable.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Invalid_iterable.snap similarity index 82% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Invalid_iterable.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Invalid_iterable.snap index 01d7edcf57..1412c3831b 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Invalid_iterable.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Invalid_iterable.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: for.md - For loops - Invalid iterable -mdtest path: crates/red_knot_python_semantic/resources/mdtest/loops/for.md +mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_New_over_old_style_iteration_protocol.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_New_over_old_style_iteration_protocol.snap similarity index 85% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_New_over_old_style_iteration_protocol.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_New_over_old_style_iteration_protocol.snap index adf5904e9b..7f015993d5 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_New_over_old_style_iteration_protocol.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_New_over_old_style_iteration_protocol.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: for.md - For loops - New over old style iteration protocol -mdtest path: crates/red_knot_python_semantic/resources/mdtest/loops/for.md +mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_No_`__iter__`_method_and_`__getitem__`_is_not_callable.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_No_`__iter__`_method_and_`__getitem__`_is_not_callable.snap similarity index 88% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_No_`__iter__`_method_and_`__getitem__`_is_not_callable.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_No_`__iter__`_method_and_`__getitem__`_is_not_callable.snap index 6ef81246c8..1603d6f183 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_No_`__iter__`_method_and_`__getitem__`_is_not_callable.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_No_`__iter__`_method_and_`__getitem__`_is_not_callable.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: for.md - For loops - No `__iter__` method and `__getitem__` is not callable -mdtest path: crates/red_knot_python_semantic/resources/mdtest/loops/for.md +mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly-not-callable_`__getitem__`_method.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly-not-callable_`__getitem__`_method.snap similarity index 95% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly-not-callable_`__getitem__`_method.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly-not-callable_`__getitem__`_method.snap index 3d3362acf4..1da698c4f8 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly-not-callable_`__getitem__`_method.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly-not-callable_`__getitem__`_method.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: for.md - For loops - Possibly-not-callable `__getitem__` method -mdtest path: crates/red_knot_python_semantic/resources/mdtest/loops/for.md +mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__getitem__`_methods.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__getitem__`_methods.snap similarity index 95% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__getitem__`_methods.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__getitem__`_methods.snap index 8b5ff406e4..e6247cb48b 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__getitem__`_methods.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__getitem__`_methods.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: for.md - For loops - Possibly invalid `__getitem__` methods -mdtest path: crates/red_knot_python_semantic/resources/mdtest/loops/for.md +mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__iter__`_methods.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__iter__`_methods.snap similarity index 95% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__iter__`_methods.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__iter__`_methods.snap index 758a101b4a..37f27c7779 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__iter__`_methods.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__iter__`_methods.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: for.md - For loops - Possibly invalid `__iter__` methods -mdtest path: crates/red_knot_python_semantic/resources/mdtest/loops/for.md +mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__next__`_method.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__next__`_method.snap similarity index 95% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__next__`_method.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__next__`_method.snap index 7b5200bc24..fb60e1a791 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__next__`_method.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_invalid_`__next__`_method.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: for.md - For loops - Possibly invalid `__next__` method -mdtest path: crates/red_knot_python_semantic/resources/mdtest/loops/for.md +mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_bad_`__getitem__`_method.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_bad_`__getitem__`_method.snap similarity index 93% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_bad_`__getitem__`_method.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_bad_`__getitem__`_method.snap index ca7f8bd055..42934ea96c 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_bad_`__getitem__`_method.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_bad_`__getitem__`_method.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: for.md - For loops - Possibly unbound `__iter__` and bad `__getitem__` method -mdtest path: crates/red_knot_python_semantic/resources/mdtest/loops/for.md +mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_possibly_invalid_`__getitem__`.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_possibly_invalid_`__getitem__`.snap similarity index 96% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_possibly_invalid_`__getitem__`.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_possibly_invalid_`__getitem__`.snap index 8157542d95..8000a1a971 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_possibly_invalid_`__getitem__`.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_possibly_invalid_`__getitem__`.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: for.md - For loops - Possibly unbound `__iter__` and possibly invalid `__getitem__` -mdtest path: crates/red_knot_python_semantic/resources/mdtest/loops/for.md +mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_possibly_unbound_`__getitem__`.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_possibly_unbound_`__getitem__`.snap similarity index 92% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_possibly_unbound_`__getitem__`.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_possibly_unbound_`__getitem__`.snap index 58fc572d74..85478fc88c 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_possibly_unbound_`__getitem__`.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Possibly_unbound_`__iter__`_and_possibly_unbound_`__getitem__`.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: for.md - For loops - Possibly unbound `__iter__` and possibly unbound `__getitem__` -mdtest path: crates/red_knot_python_semantic/resources/mdtest/loops/for.md +mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Union_type_as_iterable_where_one_union_element_has_invalid_`__iter__`_method.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Union_type_as_iterable_where_one_union_element_has_invalid_`__iter__`_method.snap similarity index 93% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Union_type_as_iterable_where_one_union_element_has_invalid_`__iter__`_method.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Union_type_as_iterable_where_one_union_element_has_invalid_`__iter__`_method.snap index 1d6cf8f415..b4be009d43 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Union_type_as_iterable_where_one_union_element_has_invalid_`__iter__`_method.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Union_type_as_iterable_where_one_union_element_has_invalid_`__iter__`_method.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: for.md - For loops - Union type as iterable where one union element has invalid `__iter__` method -mdtest path: crates/red_knot_python_semantic/resources/mdtest/loops/for.md +mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Union_type_as_iterable_where_one_union_element_has_no_`__iter__`_method.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Union_type_as_iterable_where_one_union_element_has_no_`__iter__`_method.snap similarity index 91% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Union_type_as_iterable_where_one_union_element_has_no_`__iter__`_method.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Union_type_as_iterable_where_one_union_element_has_no_`__iter__`_method.snap index bf2af5ac75..61aece908c 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Union_type_as_iterable_where_one_union_element_has_no_`__iter__`_method.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_Union_type_as_iterable_where_one_union_element_has_no_`__iter__`_method.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: for.md - For loops - Union type as iterable where one union element has no `__iter__` method -mdtest path: crates/red_knot_python_semantic/resources/mdtest/loops/for.md +mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_With_non-callable_iterator.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_With_non-callable_iterator.snap similarity index 92% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_With_non-callable_iterator.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_With_non-callable_iterator.snap index 4e4d5807b5..378a82551d 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_With_non-callable_iterator.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_With_non-callable_iterator.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: for.md - For loops - With non-callable iterator -mdtest path: crates/red_knot_python_semantic/resources/mdtest/loops/for.md +mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_does_not_return_an_iterator.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_does_not_return_an_iterator.snap similarity index 88% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_does_not_return_an_iterator.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_does_not_return_an_iterator.snap index 1360f85797..a676d7ed22 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_does_not_return_an_iterator.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_does_not_return_an_iterator.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: for.md - For loops - `__iter__` does not return an iterator -mdtest path: crates/red_knot_python_semantic/resources/mdtest/loops/for.md +mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_method_with_a_bad_signature.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_method_with_a_bad_signature.snap similarity index 90% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_method_with_a_bad_signature.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_method_with_a_bad_signature.snap index 515921e9b8..c310a44802 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_method_with_a_bad_signature.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_method_with_a_bad_signature.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: for.md - For loops - `__iter__` method with a bad signature -mdtest path: crates/red_knot_python_semantic/resources/mdtest/loops/for.md +mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_returns_an_iterator_with_an_invalid_`__next__`_method.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_returns_an_iterator_with_an_invalid_`__next__`_method.snap similarity index 94% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_returns_an_iterator_with_an_invalid_`__next__`_method.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_returns_an_iterator_with_an_invalid_`__next__`_method.snap index f5d3a90199..862f86dfc9 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_returns_an_iterator_with_an_invalid_`__next__`_method.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/for.md_-_For_loops_-_`__iter__`_returns_an_iterator_with_an_invalid_`__next__`_method.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: for.md - For loops - `__iter__` returns an iterator with an invalid `__next__` method -mdtest path: crates/red_knot_python_semantic/resources/mdtest/loops/for.md +mdtest path: crates/ty_python_semantic/resources/mdtest/loops/for.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___Legacy_syntax_-_Inferring_a_bound_typevar.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___Legacy_syntax_-_Inferring_a_bound_typevar.snap similarity index 93% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___Legacy_syntax_-_Inferring_a_bound_typevar.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___Legacy_syntax_-_Inferring_a_bound_typevar.snap index 902b25a6e7..f98a9c1382 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___Legacy_syntax_-_Inferring_a_bound_typevar.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___Legacy_syntax_-_Inferring_a_bound_typevar.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: functions.md - Generic functions: Legacy syntax - Inferring a bound typevar -mdtest path: crates/red_knot_python_semantic/resources/mdtest/generics/legacy/functions.md +mdtest path: crates/ty_python_semantic/resources/mdtest/generics/legacy/functions.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___Legacy_syntax_-_Inferring_a_constrained_typevar.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___Legacy_syntax_-_Inferring_a_constrained_typevar.snap similarity index 94% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___Legacy_syntax_-_Inferring_a_constrained_typevar.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___Legacy_syntax_-_Inferring_a_constrained_typevar.snap index f84cf8c783..6d99336f3f 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___Legacy_syntax_-_Inferring_a_constrained_typevar.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___Legacy_syntax_-_Inferring_a_constrained_typevar.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: functions.md - Generic functions: Legacy syntax - Inferring a constrained typevar -mdtest path: crates/red_knot_python_semantic/resources/mdtest/generics/legacy/functions.md +mdtest path: crates/ty_python_semantic/resources/mdtest/generics/legacy/functions.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___PEP_695_syntax_-_Inferring_a_bound_typevar.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___PEP_695_syntax_-_Inferring_a_bound_typevar.snap similarity index 93% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___PEP_695_syntax_-_Inferring_a_bound_typevar.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___PEP_695_syntax_-_Inferring_a_bound_typevar.snap index 5c03b2551b..f3e2ed614c 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___PEP_695_syntax_-_Inferring_a_bound_typevar.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___PEP_695_syntax_-_Inferring_a_bound_typevar.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: functions.md - Generic functions: PEP 695 syntax - Inferring a bound typevar -mdtest path: crates/red_knot_python_semantic/resources/mdtest/generics/pep695/functions.md +mdtest path: crates/ty_python_semantic/resources/mdtest/generics/pep695/functions.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___PEP_695_syntax_-_Inferring_a_constrained_typevar.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___PEP_695_syntax_-_Inferring_a_constrained_typevar.snap similarity index 94% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___PEP_695_syntax_-_Inferring_a_constrained_typevar.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___PEP_695_syntax_-_Inferring_a_constrained_typevar.snap index d1b259b730..7f4dd4177e 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___PEP_695_syntax_-_Inferring_a_constrained_typevar.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/functions.md_-_Generic_functions___PEP_695_syntax_-_Inferring_a_constrained_typevar.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: functions.md - Generic functions: PEP 695 syntax - Inferring a constrained typevar -mdtest path: crates/red_knot_python_semantic/resources/mdtest/generics/pep695/functions.md +mdtest path: crates/ty_python_semantic/resources/mdtest/generics/pep695/functions.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/instances.md_-_Binary_operations_on_instances_-_Operations_involving_types_with_invalid_`__bool__`_methods.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/instances.md_-_Binary_operations_on_instances_-_Operations_involving_types_with_invalid_`__bool__`_methods.snap similarity index 84% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/instances.md_-_Binary_operations_on_instances_-_Operations_involving_types_with_invalid_`__bool__`_methods.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/instances.md_-_Binary_operations_on_instances_-_Operations_involving_types_with_invalid_`__bool__`_methods.snap index ab24c67fdb..76f8b96155 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/instances.md_-_Binary_operations_on_instances_-_Operations_involving_types_with_invalid_`__bool__`_methods.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/instances.md_-_Binary_operations_on_instances_-_Operations_involving_types_with_invalid_`__bool__`_methods.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: instances.md - Binary operations on instances - Operations involving types with invalid `__bool__` methods -mdtest path: crates/red_knot_python_semantic/resources/mdtest/binary/instances.md +mdtest path: crates/ty_python_semantic/resources/mdtest/binary/instances.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Basic.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Basic.snap similarity index 83% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Basic.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Basic.snap index d7c380f6f1..4957245c99 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Basic.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Basic.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: invalid_argument_type.md - Invalid argument type diagnostics - Basic -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Calls_to_methods.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Calls_to_methods.snap similarity index 85% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Calls_to_methods.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Calls_to_methods.snap index e4e379e499..ea486b27b7 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Calls_to_methods.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Calls_to_methods.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: invalid_argument_type.md - Invalid argument type diagnostics - Calls to methods -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Different_files.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Different_files.snap similarity index 84% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Different_files.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Different_files.snap index 3a0857fb50..28984229f3 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Different_files.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Different_files.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: invalid_argument_type.md - Invalid argument type diagnostics - Different files -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Different_source_order.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Different_source_order.snap similarity index 85% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Different_source_order.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Different_source_order.snap index ca4201e624..53dac38fa6 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Different_source_order.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Different_source_order.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: invalid_argument_type.md - Invalid argument type diagnostics - Different source order -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters.snap similarity index 84% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters.snap index c96af22564..3f4412c4ab 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: invalid_argument_type.md - Invalid argument type diagnostics - Many parameters -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters_across_multiple_lines.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters_across_multiple_lines.snap similarity index 85% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters_across_multiple_lines.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters_across_multiple_lines.snap index 872613113e..6274470af6 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters_across_multiple_lines.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters_across_multiple_lines.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: invalid_argument_type.md - Invalid argument type diagnostics - Many parameters across multiple lines -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters_with_multiple_invalid_arguments.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters_with_multiple_invalid_arguments.snap similarity index 92% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters_with_multiple_invalid_arguments.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters_with_multiple_invalid_arguments.snap index 7fa5b1c59d..77f42c8017 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters_with_multiple_invalid_arguments.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Many_parameters_with_multiple_invalid_arguments.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: invalid_argument_type.md - Invalid argument type diagnostics - Many parameters with multiple invalid arguments -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Test_calling_a_function_whose_type_is_vendored_from_`typeshed`.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Test_calling_a_function_whose_type_is_vendored_from_`typeshed`.snap similarity index 86% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Test_calling_a_function_whose_type_is_vendored_from_`typeshed`.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Test_calling_a_function_whose_type_is_vendored_from_`typeshed`.snap index 4dab8917ec..6468bec1b6 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Test_calling_a_function_whose_type_is_vendored_from_`typeshed`.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Test_calling_a_function_whose_type_is_vendored_from_`typeshed`.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: invalid_argument_type.md - Invalid argument type diagnostics - Test calling a function whose type is vendored from `typeshed` -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Keyword_only_arguments.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Keyword_only_arguments.snap similarity index 86% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Keyword_only_arguments.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Keyword_only_arguments.snap index e0c157292b..e0bdd6c0b8 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Keyword_only_arguments.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Keyword_only_arguments.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: invalid_argument_type.md - Invalid argument type diagnostics - Tests for a variety of argument types - Keyword only arguments -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Mix_of_arguments.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Mix_of_arguments.snap similarity index 86% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Mix_of_arguments.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Mix_of_arguments.snap index 591bea50ba..4376b02042 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Mix_of_arguments.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Mix_of_arguments.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: invalid_argument_type.md - Invalid argument type diagnostics - Tests for a variety of argument types - Mix of arguments -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_One_keyword_argument.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_One_keyword_argument.snap similarity index 86% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_One_keyword_argument.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_One_keyword_argument.snap index 0ca5219152..5e99c713eb 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_One_keyword_argument.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_One_keyword_argument.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: invalid_argument_type.md - Invalid argument type diagnostics - Tests for a variety of argument types - One keyword argument -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Only_positional.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Only_positional.snap similarity index 85% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Only_positional.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Only_positional.snap index 912c60f2e1..9134209cdc 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Only_positional.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Only_positional.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: invalid_argument_type.md - Invalid argument type diagnostics - Tests for a variety of argument types - Only positional -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Synthetic_arguments.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Synthetic_arguments.snap similarity index 85% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Synthetic_arguments.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Synthetic_arguments.snap index 7cbf4908a8..8eb32d34e0 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Synthetic_arguments.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Synthetic_arguments.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: invalid_argument_type.md - Invalid argument type diagnostics - Tests for a variety of argument types - Synthetic arguments -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Variadic_arguments.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Variadic_arguments.snap similarity index 85% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Variadic_arguments.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Variadic_arguments.snap index b729a73e2c..d93f3e31bb 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Variadic_arguments.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Variadic_arguments.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: invalid_argument_type.md - Invalid argument type diagnostics - Tests for a variety of argument types - Variadic arguments -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Variadic_keyword_arguments.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Variadic_keyword_arguments.snap similarity index 86% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Variadic_keyword_arguments.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Variadic_keyword_arguments.snap index a3a8c87e8f..92e554c779 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Variadic_keyword_arguments.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/invalid_argument_type.md_-_Invalid_argument_type_diagnostics_-_Tests_for_a_variety_of_argument_types_-_Variadic_keyword_arguments.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: invalid_argument_type.md - Invalid argument type diagnostics - Tests for a variety of argument types - Variadic keyword arguments -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/membership_test.md_-_Comparison___Membership_Test_-_Return_type_that_doesn't_implement_`__bool__`_correctly.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/membership_test.md_-_Comparison___Membership_Test_-_Return_type_that_doesn't_implement_`__bool__`_correctly.snap similarity index 89% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/membership_test.md_-_Comparison___Membership_Test_-_Return_type_that_doesn't_implement_`__bool__`_correctly.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/membership_test.md_-_Comparison___Membership_Test_-_Return_type_that_doesn't_implement_`__bool__`_correctly.snap index 831d23cda8..e68be65dce 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/membership_test.md_-_Comparison___Membership_Test_-_Return_type_that_doesn't_implement_`__bool__`_correctly.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/membership_test.md_-_Comparison___Membership_Test_-_Return_type_that_doesn't_implement_`__bool__`_correctly.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: membership_test.md - Comparison: Membership Test - Return type that doesn't implement `__bool__` correctly -mdtest path: crates/red_knot_python_semantic/resources/mdtest/comparison/instances/membership_test.md +mdtest path: crates/ty_python_semantic/resources/mdtest/comparison/instances/membership_test.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/no_matching_overload.md_-_No_matching_overload_diagnostics_-_Calls_to_overloaded_functions.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/no_matching_overload.md_-_No_matching_overload_diagnostics_-_Calls_to_overloaded_functions.snap similarity index 77% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/no_matching_overload.md_-_No_matching_overload_diagnostics_-_Calls_to_overloaded_functions.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/no_matching_overload.md_-_No_matching_overload_diagnostics_-_Calls_to_overloaded_functions.snap index 73b3e60e6b..004791aa56 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/no_matching_overload.md_-_No_matching_overload_diagnostics_-_Calls_to_overloaded_functions.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/no_matching_overload.md_-_No_matching_overload_diagnostics_-_Calls_to_overloaded_functions.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: no_matching_overload.md - No matching overload diagnostics - Calls to overloaded functions -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/no_matching_overload.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/no_matching_overload.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/not.md_-_Unary_not_-_Object_that_implements_`__bool__`_incorrectly.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/not.md_-_Unary_not_-_Object_that_implements_`__bool__`_incorrectly.snap similarity index 83% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/not.md_-_Unary_not_-_Object_that_implements_`__bool__`_incorrectly.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/not.md_-_Unary_not_-_Object_that_implements_`__bool__`_incorrectly.snap index f3b7734eb9..f2c196b0ea 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/not.md_-_Unary_not_-_Object_that_implements_`__bool__`_incorrectly.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/not.md_-_Unary_not_-_Object_that_implements_`__bool__`_incorrectly.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: not.md - Unary not - Object that implements `__bool__` incorrectly -mdtest path: crates/red_knot_python_semantic/resources/mdtest/unary/not.md +mdtest path: crates/ty_python_semantic/resources/mdtest/unary/not.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_At_least_two_overloads.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_At_least_two_overloads.snap similarity index 90% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_At_least_two_overloads.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_At_least_two_overloads.snap index 246dff3c95..7912b94fd1 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_At_least_two_overloads.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_At_least_two_overloads.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: overloads.md - Overloads - Invalid - At least two overloads -mdtest path: crates/red_knot_python_semantic/resources/mdtest/overloads.md +mdtest path: crates/ty_python_semantic/resources/mdtest/overloads.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@classmethod`.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@classmethod`.snap similarity index 97% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@classmethod`.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@classmethod`.snap index aef6a58ff1..f129dd2d87 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@classmethod`.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@classmethod`.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: overloads.md - Overloads - Invalid - Inconsistent decorators - `@classmethod` -mdtest path: crates/red_knot_python_semantic/resources/mdtest/overloads.md +mdtest path: crates/ty_python_semantic/resources/mdtest/overloads.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@final`.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@final`.snap similarity index 95% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@final`.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@final`.snap index 97692ad5b8..b4b2f81181 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@final`.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@final`.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: overloads.md - Overloads - Invalid - Inconsistent decorators - `@final` -mdtest path: crates/red_knot_python_semantic/resources/mdtest/overloads.md +mdtest path: crates/ty_python_semantic/resources/mdtest/overloads.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@override`.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@override`.snap similarity index 96% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@override`.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@override`.snap index bae8cd1bc7..cab6c0f2d8 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@override`.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Inconsistent_decorators_-_`@override`.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: overloads.md - Overloads - Invalid - Inconsistent decorators - `@override` -mdtest path: crates/red_knot_python_semantic/resources/mdtest/overloads.md +mdtest path: crates/ty_python_semantic/resources/mdtest/overloads.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Overload_without_an_implementation_-_Regular_modules.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Overload_without_an_implementation_-_Regular_modules.snap similarity index 92% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Overload_without_an_implementation_-_Regular_modules.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Overload_without_an_implementation_-_Regular_modules.snap index f92141e10c..0ca51d8c65 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Overload_without_an_implementation_-_Regular_modules.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/overloads.md_-_Overloads_-_Invalid_-_Overload_without_an_implementation_-_Regular_modules.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: overloads.md - Overloads - Invalid - Overload without an implementation - Regular modules -mdtest path: crates/red_knot_python_semantic/resources/mdtest/overloads.md +mdtest path: crates/ty_python_semantic/resources/mdtest/overloads.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Calls_to_protocol_classes.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Calls_to_protocol_classes.snap similarity index 97% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Calls_to_protocol_classes.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Calls_to_protocol_classes.snap index a223adb681..877b2ce746 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Calls_to_protocol_classes.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Calls_to_protocol_classes.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: protocols.md - Protocols - Calls to protocol classes -mdtest path: crates/red_knot_python_semantic/resources/mdtest/protocols.md +mdtest path: crates/ty_python_semantic/resources/mdtest/protocols.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Invalid_calls_to_`get_protocol_members()`.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Invalid_calls_to_`get_protocol_members()`.snap similarity index 95% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Invalid_calls_to_`get_protocol_members()`.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Invalid_calls_to_`get_protocol_members()`.snap index ca38907009..7300c2f77d 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Invalid_calls_to_`get_protocol_members()`.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Invalid_calls_to_`get_protocol_members()`.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: protocols.md - Protocols - Invalid calls to `get_protocol_members()` -mdtest path: crates/red_knot_python_semantic/resources/mdtest/protocols.md +mdtest path: crates/ty_python_semantic/resources/mdtest/protocols.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Narrowing_of_protocols.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Narrowing_of_protocols.snap similarity index 98% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Narrowing_of_protocols.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Narrowing_of_protocols.snap index 4d6894f835..05fdb62566 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Narrowing_of_protocols.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/protocols.md_-_Protocols_-_Narrowing_of_protocols.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: protocols.md - Protocols - Narrowing of protocols -mdtest path: crates/red_knot_python_semantic/resources/mdtest/protocols.md +mdtest path: crates/ty_python_semantic/resources/mdtest/protocols.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_conditional_return_type.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_conditional_return_type.snap similarity index 93% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_conditional_return_type.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_conditional_return_type.snap index aebad91a20..d319cbd206 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_conditional_return_type.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_conditional_return_type.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: return_type.md - Function return type - Invalid conditional return type -mdtest path: crates/red_knot_python_semantic/resources/mdtest/function/return_type.md +mdtest path: crates/ty_python_semantic/resources/mdtest/function/return_type.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_implicit_return_type.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_implicit_return_type.snap similarity index 94% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_implicit_return_type.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_implicit_return_type.snap index f03d7011c0..2fd61b50b8 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_implicit_return_type.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_implicit_return_type.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: return_type.md - Function return type - Invalid implicit return type -mdtest path: crates/red_knot_python_semantic/resources/mdtest/function/return_type.md +mdtest path: crates/ty_python_semantic/resources/mdtest/function/return_type.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_return_type.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_return_type.snap similarity index 93% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_return_type.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_return_type.snap index 7e439527f1..f02798142d 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_return_type.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_return_type.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: return_type.md - Function return type - Invalid return type -mdtest path: crates/red_knot_python_semantic/resources/mdtest/function/return_type.md +mdtest path: crates/ty_python_semantic/resources/mdtest/function/return_type.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_return_type_in_stub_file.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_return_type_in_stub_file.snap similarity index 91% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_return_type_in_stub_file.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_return_type_in_stub_file.snap index 5e2334447f..bbb2df8a32 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_return_type_in_stub_file.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/return_type.md_-_Function_return_type_-_Invalid_return_type_in_stub_file.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: return_type.md - Function return type - Invalid return type in stub file -mdtest path: crates/red_knot_python_semantic/resources/mdtest/function/return_type.md +mdtest path: crates/ty_python_semantic/resources/mdtest/function/return_type.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/rich_comparison.md_-_Comparison___Rich_Comparison_-_Chained_comparisons_with_objects_that_don't_implement_`__bool__`_correctly.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/rich_comparison.md_-_Comparison___Rich_Comparison_-_Chained_comparisons_with_objects_that_don't_implement_`__bool__`_correctly.snap similarity index 91% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/rich_comparison.md_-_Comparison___Rich_Comparison_-_Chained_comparisons_with_objects_that_don't_implement_`__bool__`_correctly.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/rich_comparison.md_-_Comparison___Rich_Comparison_-_Chained_comparisons_with_objects_that_don't_implement_`__bool__`_correctly.snap index 7da9f44a68..44d10c111c 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/rich_comparison.md_-_Comparison___Rich_Comparison_-_Chained_comparisons_with_objects_that_don't_implement_`__bool__`_correctly.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/rich_comparison.md_-_Comparison___Rich_Comparison_-_Chained_comparisons_with_objects_that_don't_implement_`__bool__`_correctly.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: rich_comparison.md - Comparison: Rich Comparison - Chained comparisons with objects that don't implement `__bool__` correctly -mdtest path: crates/red_knot_python_semantic/resources/mdtest/comparison/instances/rich_comparison.md +mdtest path: crates/ty_python_semantic/resources/mdtest/comparison/instances/rich_comparison.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/semantic_syntax_errors.md_-_Semantic_syntax_error_diagnostics_-_`async`_comprehensions_in_synchronous_comprehensions_-_Python_3.10.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/semantic_syntax_errors.md_-_Semantic_syntax_error_diagnostics_-_`async`_comprehensions_in_synchronous_comprehensions_-_Python_3.10.snap similarity index 90% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/semantic_syntax_errors.md_-_Semantic_syntax_error_diagnostics_-_`async`_comprehensions_in_synchronous_comprehensions_-_Python_3.10.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/semantic_syntax_errors.md_-_Semantic_syntax_error_diagnostics_-_`async`_comprehensions_in_synchronous_comprehensions_-_Python_3.10.snap index ff4fd7a4fa..44a166a3ed 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/semantic_syntax_errors.md_-_Semantic_syntax_error_diagnostics_-_`async`_comprehensions_in_synchronous_comprehensions_-_Python_3.10.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/semantic_syntax_errors.md_-_Semantic_syntax_error_diagnostics_-_`async`_comprehensions_in_synchronous_comprehensions_-_Python_3.10.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: semantic_syntax_errors.md - Semantic syntax error diagnostics - `async` comprehensions in synchronous comprehensions - Python 3.10 -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/semantic_syntax_errors.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/semantic_syntax_errors.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/shadowing.md_-_Shadowing_-_Implicit_class_shadowing.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/shadowing.md_-_Shadowing_-_Implicit_class_shadowing.snap similarity index 78% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/shadowing.md_-_Shadowing_-_Implicit_class_shadowing.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/shadowing.md_-_Shadowing_-_Implicit_class_shadowing.snap index 19d5bb12d7..aff6a28e98 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/shadowing.md_-_Shadowing_-_Implicit_class_shadowing.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/shadowing.md_-_Shadowing_-_Implicit_class_shadowing.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: shadowing.md - Shadowing - Implicit class shadowing -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/shadowing.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/shadowing.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/shadowing.md_-_Shadowing_-_Implicit_function_shadowing.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/shadowing.md_-_Shadowing_-_Implicit_function_shadowing.snap similarity index 79% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/shadowing.md_-_Shadowing_-_Implicit_function_shadowing.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/shadowing.md_-_Shadowing_-_Implicit_function_shadowing.snap index ec187843c5..fab3dbd253 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/shadowing.md_-_Shadowing_-_Implicit_function_shadowing.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/shadowing.md_-_Shadowing_-_Implicit_function_shadowing.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: shadowing.md - Shadowing - Implicit function shadowing -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/shadowing.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/shadowing.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/tuples.md_-_Comparison___Tuples_-_Chained_comparisons_with_elements_that_incorrectly_implement_`__bool__`.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/tuples.md_-_Comparison___Tuples_-_Chained_comparisons_with_elements_that_incorrectly_implement_`__bool__`.snap similarity index 88% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/tuples.md_-_Comparison___Tuples_-_Chained_comparisons_with_elements_that_incorrectly_implement_`__bool__`.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/tuples.md_-_Comparison___Tuples_-_Chained_comparisons_with_elements_that_incorrectly_implement_`__bool__`.snap index 09c17b82b7..050643d42d 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/tuples.md_-_Comparison___Tuples_-_Chained_comparisons_with_elements_that_incorrectly_implement_`__bool__`.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/tuples.md_-_Comparison___Tuples_-_Chained_comparisons_with_elements_that_incorrectly_implement_`__bool__`.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: tuples.md - Comparison: Tuples - Chained comparisons with elements that incorrectly implement `__bool__` -mdtest path: crates/red_knot_python_semantic/resources/mdtest/comparison/tuples.md +mdtest path: crates/ty_python_semantic/resources/mdtest/comparison/tuples.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/tuples.md_-_Comparison___Tuples_-_Equality_with_elements_that_incorrectly_implement_`__bool__`.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/tuples.md_-_Comparison___Tuples_-_Equality_with_elements_that_incorrectly_implement_`__bool__`.snap similarity index 85% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/tuples.md_-_Comparison___Tuples_-_Equality_with_elements_that_incorrectly_implement_`__bool__`.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/tuples.md_-_Comparison___Tuples_-_Equality_with_elements_that_incorrectly_implement_`__bool__`.snap index 222b3e1324..8edb1dad3e 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/tuples.md_-_Comparison___Tuples_-_Equality_with_elements_that_incorrectly_implement_`__bool__`.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/tuples.md_-_Comparison___Tuples_-_Equality_with_elements_that_incorrectly_implement_`__bool__`.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: tuples.md - Comparison: Tuples - Equality with elements that incorrectly implement `__bool__` -mdtest path: crates/red_knot_python_semantic/resources/mdtest/comparison/tuples.md +mdtest path: crates/ty_python_semantic/resources/mdtest/comparison/tuples.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Exactly_too_few_values_to_unpack.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Exactly_too_few_values_to_unpack.snap similarity index 76% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Exactly_too_few_values_to_unpack.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Exactly_too_few_values_to_unpack.snap index eed266117f..aba153647b 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Exactly_too_few_values_to_unpack.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Exactly_too_few_values_to_unpack.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: unpacking.md - Unpacking - Exactly too few values to unpack -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/unpacking.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unpacking.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Exactly_too_many_values_to_unpack.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Exactly_too_many_values_to_unpack.snap similarity index 77% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Exactly_too_many_values_to_unpack.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Exactly_too_many_values_to_unpack.snap index 771602ec42..c89af563be 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Exactly_too_many_values_to_unpack.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Exactly_too_many_values_to_unpack.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: unpacking.md - Unpacking - Exactly too many values to unpack -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/unpacking.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unpacking.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Right_hand_side_not_iterable.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Right_hand_side_not_iterable.snap similarity index 78% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Right_hand_side_not_iterable.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Right_hand_side_not_iterable.snap index ab2fe8d044..0a20d08fdb 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Right_hand_side_not_iterable.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Right_hand_side_not_iterable.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: unpacking.md - Unpacking - Right hand side not iterable -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/unpacking.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unpacking.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Too_few_values_to_unpack.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Too_few_values_to_unpack.snap similarity index 78% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Too_few_values_to_unpack.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Too_few_values_to_unpack.snap index 834d4080e3..2b7dbc050e 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Too_few_values_to_unpack.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unpacking.md_-_Unpacking_-_Too_few_values_to_unpack.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: unpacking.md - Unpacking - Too few values to unpack -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/unpacking.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unpacking.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_An_unresolvable_import_that_does_not_use_`from`.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_An_unresolvable_import_that_does_not_use_`from`.snap similarity index 80% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_An_unresolvable_import_that_does_not_use_`from`.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_An_unresolvable_import_that_does_not_use_`from`.snap index 45d5aea73a..efcb90ec6e 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_An_unresolvable_import_that_does_not_use_`from`.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_An_unresolvable_import_that_does_not_use_`from`.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: unresolved_import.md - Unresolved import diagnostics - An unresolvable import that does not use `from` -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/unresolved_import.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unresolved_import.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_a_resolvable_module_but_unresolvable_item.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_a_resolvable_module_but_unresolvable_item.snap similarity index 82% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_a_resolvable_module_but_unresolvable_item.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_a_resolvable_module_but_unresolvable_item.snap index 051ba77378..5de84ecc3a 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_a_resolvable_module_but_unresolvable_item.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_a_resolvable_module_but_unresolvable_item.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: unresolved_import.md - Unresolved import diagnostics - Using `from` with a resolvable module but unresolvable item -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/unresolved_import.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unresolved_import.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unknown_current_module.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unknown_current_module.snap similarity index 80% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unknown_current_module.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unknown_current_module.snap index e311847c4e..090cba8056 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unknown_current_module.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unknown_current_module.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: unresolved_import.md - Unresolved import diagnostics - Using `from` with an unknown current module -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/unresolved_import.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unresolved_import.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unknown_nested_module.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unknown_nested_module.snap similarity index 81% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unknown_nested_module.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unknown_nested_module.snap index 3cf055505f..0123ff0edf 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unknown_nested_module.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unknown_nested_module.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: unresolved_import.md - Unresolved import diagnostics - Using `from` with an unknown nested module -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/unresolved_import.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unresolved_import.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unresolvable_module.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unresolvable_module.snap similarity index 80% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unresolvable_module.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unresolvable_module.snap index 88a6863007..999a1379a9 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unresolvable_module.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_an_unresolvable_module.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: unresolved_import.md - Unresolved import diagnostics - Using `from` with an unresolvable module -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/unresolved_import.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unresolved_import.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_too_many_leading_dots.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_too_many_leading_dots.snap similarity index 83% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_too_many_leading_dots.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_too_many_leading_dots.snap index b088fc704f..4b7e84df00 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_too_many_leading_dots.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unresolved_import.md_-_Unresolved_import_diagnostics_-_Using_`from`_with_too_many_leading_dots.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: unresolved_import.md - Unresolved import diagnostics - Using `from` with too many leading dots -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/unresolved_import.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unresolved_import.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_attribute,_but_it's_not_callable.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_attribute,_but_it's_not_callable.snap similarity index 82% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_attribute,_but_it's_not_callable.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_attribute,_but_it's_not_callable.snap index c2745e3ce3..9f228605b3 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_attribute,_but_it's_not_callable.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_attribute,_but_it's_not_callable.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: unsupported_bool_conversion.md - Different ways that `unsupported-bool-conversion` can occur - Has a `__bool__` attribute, but it's not callable -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/unsupported_bool_conversion.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unsupported_bool_conversion.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_method,_but_has_an_incorrect_return_type.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_method,_but_has_an_incorrect_return_type.snap similarity index 86% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_method,_but_has_an_incorrect_return_type.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_method,_but_has_an_incorrect_return_type.snap index ac326c9bf7..c84856aec2 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_method,_but_has_an_incorrect_return_type.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_method,_but_has_an_incorrect_return_type.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: unsupported_bool_conversion.md - Different ways that `unsupported-bool-conversion` can occur - Has a `__bool__` method, but has an incorrect return type -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/unsupported_bool_conversion.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unsupported_bool_conversion.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_method,_but_has_incorrect_parameters.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_method,_but_has_incorrect_parameters.snap similarity index 86% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_method,_but_has_incorrect_parameters.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_method,_but_has_incorrect_parameters.snap index 2aec49f346..bfd905314a 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_method,_but_has_incorrect_parameters.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Has_a_`__bool__`_method,_but_has_incorrect_parameters.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: unsupported_bool_conversion.md - Different ways that `unsupported-bool-conversion` can occur - Has a `__bool__` method, but has incorrect parameters -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/unsupported_bool_conversion.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unsupported_bool_conversion.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Part_of_a_union_where_at_least_one_member_has_incorrect_`__bool__`_method.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Part_of_a_union_where_at_least_one_member_has_incorrect_`__bool__`_method.snap similarity index 87% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Part_of_a_union_where_at_least_one_member_has_incorrect_`__bool__`_method.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Part_of_a_union_where_at_least_one_member_has_incorrect_`__bool__`_method.snap index 9624f72527..7da1d628d0 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Part_of_a_union_where_at_least_one_member_has_incorrect_`__bool__`_method.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/unsupported_bool_conversion.md_-_Different_ways_that_`unsupported-bool-conversion`_can_occur_-_Part_of_a_union_where_at_least_one_member_has_incorrect_`__bool__`_method.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: unsupported_bool_conversion.md - Different ways that `unsupported-bool-conversion` can occur - Part of a union where at least one member has incorrect `__bool__` method -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/unsupported_bool_conversion.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/unsupported_bool_conversion.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/snapshots/version_related_syntax_errors.md_-_Version-related_syntax_error_diagnostics_-_`match`_statement_-_Before_3.10.snap b/crates/ty_python_semantic/resources/mdtest/snapshots/version_related_syntax_errors.md_-_Version-related_syntax_error_diagnostics_-_`match`_statement_-_Before_3.10.snap similarity index 83% rename from crates/red_knot_python_semantic/resources/mdtest/snapshots/version_related_syntax_errors.md_-_Version-related_syntax_error_diagnostics_-_`match`_statement_-_Before_3.10.snap rename to crates/ty_python_semantic/resources/mdtest/snapshots/version_related_syntax_errors.md_-_Version-related_syntax_error_diagnostics_-_`match`_statement_-_Before_3.10.snap index ab4887c2cb..ad47fde3f1 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/snapshots/version_related_syntax_errors.md_-_Version-related_syntax_error_diagnostics_-_`match`_statement_-_Before_3.10.snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/version_related_syntax_errors.md_-_Version-related_syntax_error_diagnostics_-_`match`_statement_-_Before_3.10.snap @@ -1,10 +1,10 @@ --- -source: crates/red_knot_test/src/lib.rs +source: crates/ty_test/src/lib.rs expression: snapshot --- --- mdtest name: version_related_syntax_errors.md - Version-related syntax error diagnostics - `match` statement - Before 3.10 -mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/version_related_syntax_errors.md +mdtest path: crates/ty_python_semantic/resources/mdtest/diagnostics/version_related_syntax_errors.md --- # Python source files diff --git a/crates/red_knot_python_semantic/resources/mdtest/statically_known_branches.md b/crates/ty_python_semantic/resources/mdtest/statically_known_branches.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/statically_known_branches.md rename to crates/ty_python_semantic/resources/mdtest/statically_known_branches.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/stubs/class.md b/crates/ty_python_semantic/resources/mdtest/stubs/class.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/stubs/class.md rename to crates/ty_python_semantic/resources/mdtest/stubs/class.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/stubs/ellipsis.md b/crates/ty_python_semantic/resources/mdtest/stubs/ellipsis.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/stubs/ellipsis.md rename to crates/ty_python_semantic/resources/mdtest/stubs/ellipsis.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/stubs/locals.md b/crates/ty_python_semantic/resources/mdtest/stubs/locals.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/stubs/locals.md rename to crates/ty_python_semantic/resources/mdtest/stubs/locals.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/subscript/bytes.md b/crates/ty_python_semantic/resources/mdtest/subscript/bytes.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/subscript/bytes.md rename to crates/ty_python_semantic/resources/mdtest/subscript/bytes.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/subscript/class.md b/crates/ty_python_semantic/resources/mdtest/subscript/class.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/subscript/class.md rename to crates/ty_python_semantic/resources/mdtest/subscript/class.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/subscript/instance.md b/crates/ty_python_semantic/resources/mdtest/subscript/instance.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/subscript/instance.md rename to crates/ty_python_semantic/resources/mdtest/subscript/instance.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/subscript/lists.md b/crates/ty_python_semantic/resources/mdtest/subscript/lists.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/subscript/lists.md rename to crates/ty_python_semantic/resources/mdtest/subscript/lists.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/subscript/stepsize_zero.md b/crates/ty_python_semantic/resources/mdtest/subscript/stepsize_zero.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/subscript/stepsize_zero.md rename to crates/ty_python_semantic/resources/mdtest/subscript/stepsize_zero.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/subscript/string.md b/crates/ty_python_semantic/resources/mdtest/subscript/string.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/subscript/string.md rename to crates/ty_python_semantic/resources/mdtest/subscript/string.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/subscript/tuple.md b/crates/ty_python_semantic/resources/mdtest/subscript/tuple.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/subscript/tuple.md rename to crates/ty_python_semantic/resources/mdtest/subscript/tuple.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/suppressions/no_type_check.md b/crates/ty_python_semantic/resources/mdtest/suppressions/no_type_check.md similarity index 90% rename from crates/red_knot_python_semantic/resources/mdtest/suppressions/no_type_check.md rename to crates/ty_python_semantic/resources/mdtest/suppressions/no_type_check.md index 21f2cb9dc4..37e3202061 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/suppressions/no_type_check.md +++ b/crates/ty_python_semantic/resources/mdtest/suppressions/no_type_check.md @@ -93,8 +93,8 @@ def test() -> Undefined: ## `no_type_check` on classes isn't supported -Red Knot does not support decorating classes with `no_type_check`. The behaviour of `no_type_check` -when applied to classes is +ty does not support decorating classes with `no_type_check`. The behaviour of `no_type_check` when +applied to classes is [not specified currently](https://typing.python.org/en/latest/spec/directives.html#no-type-check), and is not supported by Pyright or mypy. @@ -117,6 +117,6 @@ from typing import no_type_check @no_type_check def test(): - # error: [unused-ignore-comment] "Unused `knot: ignore` directive: 'unresolved-reference'" - return x + 5 # knot: ignore[unresolved-reference] + # error: [unused-ignore-comment] "Unused `ty: ignore` directive: 'unresolved-reference'" + return x + 5 # ty: ignore[unresolved-reference] ``` diff --git a/crates/ty_python_semantic/resources/mdtest/suppressions/ty_ignore.md b/crates/ty_python_semantic/resources/mdtest/suppressions/ty_ignore.md new file mode 100644 index 0000000000..9a1930f015 --- /dev/null +++ b/crates/ty_python_semantic/resources/mdtest/suppressions/ty_ignore.md @@ -0,0 +1,191 @@ +# Suppressing errors with `ty: ignore` + +Type check errors can be suppressed by a `ty: ignore` comment on the same line as the violation. + +## Simple `ty: ignore` + +```py +a = 4 + test # ty: ignore +``` + +## Suppressing a specific code + +```py +a = 4 + test # ty: ignore[unresolved-reference] +``` + +## Unused suppression + +```py +test = 10 +# error: [unused-ignore-comment] "Unused `ty: ignore` directive: 'possibly-unresolved-reference'" +a = test + 3 # ty: ignore[possibly-unresolved-reference] +``` + +## Unused suppression if the error codes don't match + +```py +# error: [unresolved-reference] +# error: [unused-ignore-comment] "Unused `ty: ignore` directive: 'possibly-unresolved-reference'" +a = test + 3 # ty: ignore[possibly-unresolved-reference] +``` + +## Suppressed unused comment + +```py +# error: [unused-ignore-comment] +a = 10 / 2 # ty: ignore[division-by-zero] +a = 10 / 2 # ty: ignore[division-by-zero, unused-ignore-comment] +a = 10 / 2 # ty: ignore[unused-ignore-comment, division-by-zero] +a = 10 / 2 # ty: ignore[unused-ignore-comment] # type: ignore +a = 10 / 2 # type: ignore # ty: ignore[unused-ignore-comment] +``` + +## Unused ignore comment + +```py +# error: [unused-ignore-comment] "Unused `ty: ignore` directive: 'unused-ignore-comment'" +a = 10 / 0 # ty: ignore[division-by-zero, unused-ignore-comment] +``` + +## Multiple unused comments + +Today, ty emits a diagnostic for every unused code. We might want to group the codes by comment at +some point in the future. + +```py +# error: [unused-ignore-comment] "Unused `ty: ignore` directive: 'division-by-zero'" +# error: [unused-ignore-comment] "Unused `ty: ignore` directive: 'unresolved-reference'" +a = 10 / 2 # ty: ignore[division-by-zero, unresolved-reference] + +# error: [unused-ignore-comment] "Unused `ty: ignore` directive: 'invalid-assignment'" +# error: [unused-ignore-comment] "Unused `ty: ignore` directive: 'unresolved-reference'" +a = 10 / 0 # ty: ignore[invalid-assignment, division-by-zero, unresolved-reference] +``` + +## Multiple suppressions + +```py +# fmt: off +def test(a: f"f-string type annotation", b: b"byte-string-type-annotation"): ... # ty: ignore[fstring-type-annotation, byte-string-type-annotation] +``` + +## Can't suppress syntax errors + + + +```py +# error: [invalid-syntax] +# error: [unused-ignore-comment] +def test($): # ty: ignore + pass +``` + + + +## Can't suppress `revealed-type` diagnostics + +```py +a = 10 +# revealed: Literal[10] +# error: [unknown-rule] "Unknown rule `revealed-type`" +reveal_type(a) # ty: ignore[revealed-type] +``` + +## Extra whitespace in type ignore comments is allowed + +```py +a = 10 / 0 # ty : ignore +a = 10 / 0 # ty: ignore [ division-by-zero ] +``` + +## Whitespace is optional + +```py +# fmt: off +a = 10 / 0 #ty:ignore[division-by-zero] +``` + +## Trailing codes comma + +Trailing commas in the codes section are allowed: + +```py +a = 10 / 0 # ty: ignore[division-by-zero,] +``` + +## Invalid characters in codes + +```py +# error: [division-by-zero] +# error: [invalid-ignore-comment] "Invalid `ty: ignore` comment: expected a alphanumeric character or `-` or `_` as code" +a = 10 / 0 # ty: ignore[*-*] +``` + +## Trailing whitespace + + + +```py +a = 10 / 0 # ty: ignore[division-by-zero] + # ^^^^^^ trailing whitespace +``` + + + +## Missing comma + +A missing comma results in an invalid suppression comment. We may want to recover from this in the +future. + +```py +# error: [unresolved-reference] +# error: [invalid-ignore-comment] "Invalid `ty: ignore` comment: expected a comma separating the rule codes" +a = x / 0 # ty: ignore[division-by-zero unresolved-reference] +``` + +## Missing closing bracket + +```py +# error: [unresolved-reference] "Name `x` used when not defined" +# error: [invalid-ignore-comment] "Invalid `ty: ignore` comment: expected a comma separating the rule codes" +a = x / 2 # ty: ignore[unresolved-reference +``` + +## Empty codes + +An empty codes array suppresses no-diagnostics and is always useless + +```py +# error: [division-by-zero] +# error: [unused-ignore-comment] "Unused `ty: ignore` without a code" +a = 4 / 0 # ty: ignore[] +``` + +## File-level suppression comments + +File level suppression comments are currently intentionally unsupported because we've yet to decide +if they should use a different syntax that also supports enabling rules or changing the rule's +severity: `ty: possibly-undefined-reference=error` + +```py +# error: [unused-ignore-comment] +# ty: ignore[division-by-zero] + +a = 4 / 0 # error: [division-by-zero] +``` + +## Unknown rule + +```py +# error: [unknown-rule] "Unknown rule `is-equal-14`" +a = 10 + 4 # ty: ignore[is-equal-14] +``` + +## Code with `lint:` prefix + +```py +# error:[unknown-rule] "Unknown rule `lint:division-by-zero`. Did you mean `division-by-zero`?" +# error: [division-by-zero] +a = 10 / 0 # ty: ignore[lint:division-by-zero] +``` diff --git a/crates/red_knot_python_semantic/resources/mdtest/suppressions/type_ignore.md b/crates/ty_python_semantic/resources/mdtest/suppressions/type_ignore.md similarity index 95% rename from crates/red_knot_python_semantic/resources/mdtest/suppressions/type_ignore.md rename to crates/ty_python_semantic/resources/mdtest/suppressions/type_ignore.md index 87cf6ee69e..43e9eedcc2 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/suppressions/type_ignore.md +++ b/crates/ty_python_semantic/resources/mdtest/suppressions/type_ignore.md @@ -87,8 +87,8 @@ a = test \ ## Codes -Mypy supports `type: ignore[code]`. Red Knot doesn't understand mypy's rule names. Therefore, ignore -the codes and suppress all errors. +Mypy supports `type: ignore[code]`. ty doesn't understand mypy's rule names. Therefore, ignore the +codes and suppress all errors. ```py a = test # type: ignore[name-defined] @@ -116,7 +116,7 @@ a = test + 2 # type: ignoree ## Invalid - ignore on opening parentheses `type: ignore` comments after an opening parentheses suppress any type errors inside the parentheses -in Pyright. Neither Ruff, nor mypy support this and neither does Red Knot. +in Pyright. Neither Ruff, nor mypy support this and neither does ty. ```py # fmt: off diff --git a/crates/red_knot_python_semantic/resources/mdtest/sys_platform.md b/crates/ty_python_semantic/resources/mdtest/sys_platform.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/sys_platform.md rename to crates/ty_python_semantic/resources/mdtest/sys_platform.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/sys_version_info.md b/crates/ty_python_semantic/resources/mdtest/sys_version_info.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/sys_version_info.md rename to crates/ty_python_semantic/resources/mdtest/sys_version_info.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/terminal_statements.md b/crates/ty_python_semantic/resources/mdtest/terminal_statements.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/terminal_statements.md rename to crates/ty_python_semantic/resources/mdtest/terminal_statements.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/type_api.md b/crates/ty_python_semantic/resources/mdtest/type_api.md similarity index 83% rename from crates/red_knot_python_semantic/resources/mdtest/type_api.md rename to crates/ty_python_semantic/resources/mdtest/type_api.md index c767fe98a0..5e1621ccb2 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/type_api.md +++ b/crates/ty_python_semantic/resources/mdtest/type_api.md @@ -1,14 +1,14 @@ -# Type API (`knot_extensions`) +# Type API (`ty_extensions`) -This document describes the internal `knot_extensions` API for creating and manipulating types as -well as testing various type system properties. +This document describes the internal `ty_extensions` API for creating and manipulating types as well +as testing various type system properties. ## Type extensions The Python language itself allows us to perform a variety of operations on types. For example, we can build a union of types like `int | None`, or we can use type constructors such as `list[int]` -and `type[int]` to create new types. But some type-level operations that we rely on in Red Knot, -like intersections, cannot yet be expressed in Python. The `knot_extensions` module provides the +and `type[int]` to create new types. But some type-level operations that we rely on in ty, like +intersections, cannot yet be expressed in Python. The `ty_extensions` module provides the `Intersection` and `Not` type constructors (special forms) which allow us to construct these types directly. @@ -16,14 +16,14 @@ directly. ```py from typing import Literal -from knot_extensions import Not, static_assert +from ty_extensions import Not, static_assert def negate(n1: Not[int], n2: Not[Not[int]], n3: Not[Not[Not[int]]]) -> None: reveal_type(n1) # revealed: ~int reveal_type(n2) # revealed: int reveal_type(n3) # revealed: ~int -# error: "Special form `knot_extensions.Not` expected exactly one type parameter" +# error: "Special form `ty_extensions.Not` expected exactly one type parameter" n: Not[int, str] def static_truthiness(not_one: Not[Literal[1]]) -> None: @@ -48,7 +48,7 @@ python-version = "3.12" ``` ```py -from knot_extensions import Intersection, Not, is_subtype_of, static_assert +from ty_extensions import Intersection, Not, is_subtype_of, static_assert from typing_extensions import Literal, Never class S: ... @@ -87,7 +87,7 @@ The `Unknown` type is a special type that we use to represent actually unknown t annotation), as opposed to `Any` which represents an explicitly unknown type. ```py -from knot_extensions import Unknown, static_assert, is_assignable_to, is_fully_static +from ty_extensions import Unknown, static_assert, is_assignable_to, is_fully_static static_assert(is_assignable_to(Unknown, int)) static_assert(is_assignable_to(int, Unknown)) @@ -108,7 +108,7 @@ class C(Unknown): ... # revealed: tuple[Literal[C], Unknown, Literal[object]] reveal_type(C.__mro__) -# error: "Special form `knot_extensions.Unknown` expected no type parameter" +# error: "Special form `ty_extensions.Unknown` expected no type parameter" u: Unknown[str] ``` @@ -122,7 +122,7 @@ They do not accept any type arguments. ```py from typing_extensions import Literal -from knot_extensions import AlwaysFalsy, AlwaysTruthy, is_subtype_of, static_assert +from ty_extensions import AlwaysFalsy, AlwaysTruthy, is_subtype_of, static_assert static_assert(is_subtype_of(Literal[True], AlwaysTruthy)) static_assert(is_subtype_of(Literal[False], AlwaysFalsy)) @@ -146,12 +146,12 @@ def f( ### Basics -The `knot_extensions` module provides a `static_assert` function that can be used to enforce +The `ty_extensions` module provides a `static_assert` function that can be used to enforce properties at type-check time. The function takes an arbitrary expression and raises a type error if the expression is not of statically known truthiness. ```py -from knot_extensions import static_assert +from ty_extensions import static_assert from typing import TYPE_CHECKING import sys @@ -182,7 +182,7 @@ static_assert(sys.version_info >= (3, 6)) Static assertions can be used to enforce narrowing constraints: ```py -from knot_extensions import static_assert +from ty_extensions import static_assert def f(x: int | None) -> None: if x is not None: @@ -196,7 +196,7 @@ def f(x: int | None) -> None: See also: ```py -from knot_extensions import static_assert +from ty_extensions import static_assert static_assert(True) static_assert(False) # error: "Static assertion error: argument evaluates to `False`" @@ -221,7 +221,7 @@ static_assert(b"") # error: "Static assertion error: argument of type `Literal[ We provide various tailored error messages for wrong argument types to `static_assert`: ```py -from knot_extensions import static_assert +from ty_extensions import static_assert static_assert(2 * 3 == 6) @@ -244,7 +244,7 @@ static_assert(InvalidBoolDunder()) Alternatively, users can provide custom error messages: ```py -from knot_extensions import static_assert +from ty_extensions import static_assert # error: "Static assertion error: I really want this to be true" static_assert(1 + 1 == 3, "I really want this to be true") @@ -266,14 +266,14 @@ static_assert(False, shouted_message) ## Type predicates -The `knot_extensions` module also provides predicates to test various properties of types. These are +The `ty_extensions` module also provides predicates to test various properties of types. These are implemented as functions that return `Literal[True]` or `Literal[False]` depending on the result of the test. ### Equivalence ```py -from knot_extensions import is_equivalent_to, static_assert +from ty_extensions import is_equivalent_to, static_assert from typing_extensions import Never, Union static_assert(is_equivalent_to(type, type[object])) @@ -287,7 +287,7 @@ static_assert(not is_equivalent_to(int | str, int | str | bytes)) ### Subtyping ```py -from knot_extensions import is_subtype_of, static_assert +from ty_extensions import is_subtype_of, static_assert static_assert(is_subtype_of(bool, int)) static_assert(not is_subtype_of(str, int)) @@ -311,7 +311,7 @@ static_assert(not is_subtype_of(Base, Unrelated)) ### Assignability ```py -from knot_extensions import is_assignable_to, static_assert +from ty_extensions import is_assignable_to, static_assert from typing import Any static_assert(is_assignable_to(int, Any)) @@ -322,7 +322,7 @@ static_assert(not is_assignable_to(int, str)) ### Disjointness ```py -from knot_extensions import is_disjoint_from, static_assert +from ty_extensions import is_disjoint_from, static_assert from typing import Literal static_assert(is_disjoint_from(None, int)) @@ -332,7 +332,7 @@ static_assert(not is_disjoint_from(Literal[2] | str, int)) ### Fully static types ```py -from knot_extensions import is_fully_static, static_assert +from ty_extensions import is_fully_static, static_assert from typing import Any static_assert(is_fully_static(int | str)) @@ -345,7 +345,7 @@ static_assert(not is_fully_static(type[Any])) ### Singleton types ```py -from knot_extensions import is_singleton, static_assert +from ty_extensions import is_singleton, static_assert from typing import Literal static_assert(is_singleton(None)) @@ -358,7 +358,7 @@ static_assert(not is_singleton(Literal["a"])) ### Single-valued types ```py -from knot_extensions import is_single_valued, static_assert +from ty_extensions import is_single_valued, static_assert from typing import Literal static_assert(is_single_valued(None)) @@ -378,7 +378,7 @@ type `str` itself is a subtype of `type[str]`. Instead, we can use `TypeOf[str]` the expression `str`: ```py -from knot_extensions import TypeOf, is_subtype_of, static_assert +from ty_extensions import TypeOf, is_subtype_of, static_assert # This is incorrect and therefore fails with ... # error: "Static assertion error: argument evaluates to `False`" @@ -402,10 +402,10 @@ def type_of_annotation() -> None: s1: type[Base] = Base s2: type[Base] = Derived # no error here -# error: "Special form `knot_extensions.TypeOf` expected exactly one type parameter" +# error: "Special form `ty_extensions.TypeOf` expected exactly one type parameter" t: TypeOf[int, str, bytes] -# error: [invalid-type-form] "`knot_extensions.TypeOf` requires exactly one argument when used in a type expression" +# error: [invalid-type-form] "`ty_extensions.TypeOf` requires exactly one argument when used in a type expression" def f(x: TypeOf) -> None: reveal_type(x) # revealed: Unknown ``` @@ -419,7 +419,7 @@ which can then be used to test various type properties. It accepts a single type parameter which is expected to be a callable object. ```py -from knot_extensions import CallableTypeOf +from ty_extensions import CallableTypeOf def f1(): return @@ -430,13 +430,13 @@ def f2() -> int: def f3(x: int, y: str) -> None: return -# error: [invalid-type-form] "Special form `knot_extensions.CallableTypeOf` expected exactly one type parameter" +# error: [invalid-type-form] "Special form `ty_extensions.CallableTypeOf` expected exactly one type parameter" c1: CallableTypeOf[f1, f2] -# error: [invalid-type-form] "Expected the first argument to `knot_extensions.CallableTypeOf` to be a callable object, but got an object of type `Literal["foo"]`" +# error: [invalid-type-form] "Expected the first argument to `ty_extensions.CallableTypeOf` to be a callable object, but got an object of type `Literal["foo"]`" c2: CallableTypeOf["foo"] -# error: [invalid-type-form] "`knot_extensions.CallableTypeOf` requires exactly one argument when used in a type expression" +# error: [invalid-type-form] "`ty_extensions.CallableTypeOf` requires exactly one argument when used in a type expression" def f(x: CallableTypeOf) -> None: reveal_type(x) # revealed: Unknown ``` diff --git a/crates/red_knot_python_semantic/resources/mdtest/type_of/basic.md b/crates/ty_python_semantic/resources/mdtest/type_of/basic.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/type_of/basic.md rename to crates/ty_python_semantic/resources/mdtest/type_of/basic.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/type_of/dynamic.md b/crates/ty_python_semantic/resources/mdtest/type_of/dynamic.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/type_of/dynamic.md rename to crates/ty_python_semantic/resources/mdtest/type_of/dynamic.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/type_of/typing_dot_Type.md b/crates/ty_python_semantic/resources/mdtest/type_of/typing_dot_Type.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/type_of/typing_dot_Type.md rename to crates/ty_python_semantic/resources/mdtest/type_of/typing_dot_Type.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/type_properties/is_assignable_to.md b/crates/ty_python_semantic/resources/mdtest/type_properties/is_assignable_to.md similarity index 94% rename from crates/red_knot_python_semantic/resources/mdtest/type_properties/is_assignable_to.md rename to crates/ty_python_semantic/resources/mdtest/type_properties/is_assignable_to.md index 840c4f48e3..93238ed137 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/type_properties/is_assignable_to.md +++ b/crates/ty_python_semantic/resources/mdtest/type_properties/is_assignable_to.md @@ -13,7 +13,7 @@ Fully static types participate in subtyping. If a type `S` is a subtype of `T`, assignable to `T`. Two equivalent types are subtypes of each other: ```py -from knot_extensions import static_assert, is_assignable_to +from ty_extensions import static_assert, is_assignable_to class Parent: ... class Child1(Parent): ... @@ -40,7 +40,7 @@ Gradual types do not participate in subtyping, but can still be assignable to ot static types can be assignable to gradual types): ```py -from knot_extensions import static_assert, is_assignable_to, Unknown +from ty_extensions import static_assert, is_assignable_to, Unknown from typing import Any, Literal static_assert(is_assignable_to(Unknown, Literal[1])) @@ -64,7 +64,7 @@ static_assert(not is_assignable_to(int, SubtypeOfAny)) which is in turn a subtype of `int`: ```py -from knot_extensions import static_assert, is_assignable_to +from ty_extensions import static_assert, is_assignable_to from typing import Literal static_assert(is_assignable_to(Literal[True], Literal[True])) @@ -78,7 +78,7 @@ static_assert(not is_assignable_to(bool, Literal[True])) ### Integer literals ```py -from knot_extensions import static_assert, is_assignable_to +from ty_extensions import static_assert, is_assignable_to from typing import Literal static_assert(is_assignable_to(Literal[1], Literal[1])) @@ -95,7 +95,7 @@ All string-literal types are subtypes of (and therefore assignable to) `LiteralS turn a subtype of `str`: ```py -from knot_extensions import static_assert, is_assignable_to +from ty_extensions import static_assert, is_assignable_to from typing_extensions import Literal, LiteralString static_assert(is_assignable_to(Literal["foo"], Literal["foo"])) @@ -112,7 +112,7 @@ static_assert(not is_assignable_to(str, LiteralString)) ### Byte literals ```py -from knot_extensions import static_assert, is_assignable_to +from ty_extensions import static_assert, is_assignable_to from typing_extensions import Literal, LiteralString static_assert(is_assignable_to(Literal[b"foo"], bytes)) @@ -136,7 +136,7 @@ Both `TypeOf[str]` and `type[str]` are subtypes of `type` and `type[object]`, wh is known to be no larger than the set of possible objects represented by `type`. ```py -from knot_extensions import static_assert, is_assignable_to, Unknown, TypeOf +from ty_extensions import static_assert, is_assignable_to, Unknown, TypeOf from typing import Any static_assert(is_assignable_to(type, type)) @@ -190,7 +190,7 @@ static_assert(is_assignable_to(Meta, type[Unknown])) ## Tuple types ```py -from knot_extensions import static_assert, is_assignable_to, AlwaysTruthy, AlwaysFalsy +from ty_extensions import static_assert, is_assignable_to, AlwaysTruthy, AlwaysFalsy from typing import Literal, Any static_assert(is_assignable_to(tuple[()], tuple[()])) @@ -224,7 +224,7 @@ static_assert(not is_assignable_to(tuple[Any, Literal[2]], tuple[int, str])) ## Union types ```py -from knot_extensions import AlwaysTruthy, AlwaysFalsy, static_assert, is_assignable_to, Unknown +from ty_extensions import AlwaysTruthy, AlwaysFalsy, static_assert, is_assignable_to, Unknown from typing_extensions import Literal, Any, LiteralString static_assert(is_assignable_to(int, int | str)) @@ -259,7 +259,7 @@ static_assert(not is_assignable_to(Literal[True] | AlwaysFalsy, Literal[False] | ## Intersection types ```py -from knot_extensions import static_assert, is_assignable_to, Intersection, Not, AlwaysTruthy, AlwaysFalsy +from ty_extensions import static_assert, is_assignable_to, Intersection, Not, AlwaysTruthy, AlwaysFalsy from typing_extensions import Any, Literal, final, LiteralString class Parent: ... @@ -347,7 +347,7 @@ See also: our property tests in `property_tests.rs`. `object` is Python's top type; the set of all possible objects at runtime: ```py -from knot_extensions import static_assert, is_assignable_to, Unknown +from ty_extensions import static_assert, is_assignable_to, Unknown from typing import Literal, Any static_assert(is_assignable_to(str, object)) @@ -367,7 +367,7 @@ static_assert(is_assignable_to(type[Any], object)) any type is assignable to them: ```py -from knot_extensions import static_assert, is_assignable_to, Unknown +from ty_extensions import static_assert, is_assignable_to, Unknown from typing import Literal, Any static_assert(is_assignable_to(str, Any)) @@ -397,7 +397,7 @@ static_assert(is_assignable_to(type[Any], Unknown)) assignable to any arbitrary type. ```py -from knot_extensions import static_assert, is_assignable_to, Unknown +from ty_extensions import static_assert, is_assignable_to, Unknown from typing_extensions import Never, Any, Literal static_assert(is_assignable_to(Never, str)) @@ -420,7 +420,7 @@ are covered in the [subtyping tests](./is_subtype_of.md#callable). ### Return type ```py -from knot_extensions import CallableTypeOf, Unknown, static_assert, is_assignable_to +from ty_extensions import CallableTypeOf, Unknown, static_assert, is_assignable_to from typing import Any, Callable static_assert(is_assignable_to(Callable[[], Any], Callable[[], int])) @@ -450,7 +450,7 @@ A `Callable` which uses the gradual form (`...`) for the parameter types is cons input signature. ```py -from knot_extensions import CallableTypeOf, static_assert, is_assignable_to +from ty_extensions import CallableTypeOf, static_assert, is_assignable_to from typing import Any, Callable static_assert(is_assignable_to(Callable[[], None], Callable[..., None])) @@ -576,7 +576,7 @@ c: Callable[[int], str] = overloaded ```py from typing import Callable, Any -from knot_extensions import static_assert, is_assignable_to +from ty_extensions import static_assert, is_assignable_to class TakesAny: def __call__(self, a: Any) -> str: diff --git a/crates/red_knot_python_semantic/resources/mdtest/type_properties/is_disjoint_from.md b/crates/ty_python_semantic/resources/mdtest/type_properties/is_disjoint_from.md similarity index 92% rename from crates/red_knot_python_semantic/resources/mdtest/type_properties/is_disjoint_from.md rename to crates/ty_python_semantic/resources/mdtest/type_properties/is_disjoint_from.md index 981851a6c7..2671887d95 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/type_properties/is_disjoint_from.md +++ b/crates/ty_python_semantic/resources/mdtest/type_properties/is_disjoint_from.md @@ -7,7 +7,7 @@ This means that it is known that no possible runtime object inhabits both types ```py from typing_extensions import Literal, LiteralString, Any -from knot_extensions import Intersection, Not, TypeOf, is_disjoint_from, static_assert +from ty_extensions import Intersection, Not, TypeOf, is_disjoint_from, static_assert static_assert(is_disjoint_from(bool, str)) static_assert(not is_disjoint_from(bool, bool)) @@ -27,7 +27,7 @@ static_assert(not is_disjoint_from(str, type[Any])) ## Class hierarchies ```py -from knot_extensions import is_disjoint_from, static_assert, Intersection, is_subtype_of +from ty_extensions import is_disjoint_from, static_assert, Intersection, is_subtype_of from typing import final class A: ... @@ -75,7 +75,7 @@ static_assert(is_disjoint_from(UsesMeta1, UsesMeta2)) ```py from typing_extensions import Literal, Never -from knot_extensions import TypeOf, is_disjoint_from, static_assert +from ty_extensions import TypeOf, is_disjoint_from, static_assert static_assert(is_disjoint_from(tuple[()], TypeOf[object])) static_assert(is_disjoint_from(tuple[()], TypeOf[Literal])) @@ -97,7 +97,7 @@ static_assert(not is_disjoint_from(tuple[Literal[1], Literal[2]], tuple[Literal[ ```py from typing_extensions import Literal -from knot_extensions import Intersection, is_disjoint_from, static_assert +from ty_extensions import Intersection, is_disjoint_from, static_assert static_assert(is_disjoint_from(Literal[1, 2], Literal[3])) static_assert(is_disjoint_from(Literal[1, 2], Literal[3, 4])) @@ -110,7 +110,7 @@ static_assert(not is_disjoint_from(Literal[1, 2], Literal[2, 3])) ```py from typing_extensions import Literal, final, Any -from knot_extensions import Intersection, is_disjoint_from, static_assert, Not +from ty_extensions import Intersection, is_disjoint_from, static_assert, Not @final class P: ... @@ -175,7 +175,7 @@ static_assert(is_disjoint_from(Not[int], Intersection[int, Any])) ```py from typing_extensions import Never -from knot_extensions import is_disjoint_from, static_assert +from ty_extensions import is_disjoint_from, static_assert static_assert(is_disjoint_from(Never, Never)) static_assert(is_disjoint_from(Never, None)) @@ -187,7 +187,7 @@ static_assert(is_disjoint_from(Never, object)) ```py from typing_extensions import Literal, LiteralString -from knot_extensions import is_disjoint_from, static_assert, Intersection, Not +from ty_extensions import is_disjoint_from, static_assert, Intersection, Not static_assert(is_disjoint_from(None, Literal[True])) static_assert(is_disjoint_from(None, Literal[1])) @@ -209,7 +209,7 @@ static_assert(is_disjoint_from(None, Intersection[int, Not[str]])) ```py from typing_extensions import Literal, LiteralString -from knot_extensions import Intersection, Not, TypeOf, is_disjoint_from, static_assert, AlwaysFalsy, AlwaysTruthy +from ty_extensions import Intersection, Not, TypeOf, is_disjoint_from, static_assert, AlwaysFalsy, AlwaysTruthy static_assert(is_disjoint_from(Literal[True], Literal[False])) static_assert(is_disjoint_from(Literal[True], Literal[1])) @@ -266,7 +266,7 @@ python-version = "3.12" ```py from types import ModuleType, FunctionType -from knot_extensions import TypeOf, is_disjoint_from, static_assert +from ty_extensions import TypeOf, is_disjoint_from, static_assert class A: ... class B: ... @@ -306,7 +306,7 @@ static_assert(not is_disjoint_from(TypeOf[f], object)) ### `AlwaysTruthy` and `AlwaysFalsy` ```py -from knot_extensions import AlwaysFalsy, AlwaysTruthy, is_disjoint_from, static_assert +from ty_extensions import AlwaysFalsy, AlwaysTruthy, is_disjoint_from, static_assert from typing import Literal static_assert(is_disjoint_from(None, AlwaysTruthy)) @@ -327,7 +327,7 @@ the instance type is not a subclass of `T`'s metaclass. ```py from typing import final -from knot_extensions import is_disjoint_from, static_assert +from ty_extensions import is_disjoint_from, static_assert @final class Foo: ... @@ -360,7 +360,7 @@ metaclass of `T` is disjoint from the metaclass of `S`. ```py from typing import final -from knot_extensions import static_assert, is_disjoint_from +from ty_extensions import static_assert, is_disjoint_from @final class Meta1(type): ... @@ -383,7 +383,7 @@ As such, for any two callable types, it is possible to conceive of a runtime cal would inhabit both types simultaneously. ```py -from knot_extensions import CallableTypeOf, is_disjoint_from, static_assert +from ty_extensions import CallableTypeOf, is_disjoint_from, static_assert from typing_extensions import Callable, Literal, Never def mixed(a: int, /, b: str, *args: int, c: int = 2, **kwargs: int) -> None: ... @@ -404,7 +404,7 @@ static_assert(not is_disjoint_from(Callable[[Never], str], Callable[[Never], int A callable type is disjoint from all literal types. ```py -from knot_extensions import CallableTypeOf, is_disjoint_from, static_assert +from ty_extensions import CallableTypeOf, is_disjoint_from, static_assert from typing_extensions import Callable, Literal, Never static_assert(is_disjoint_from(Callable[[], None], Literal[""])) diff --git a/crates/red_knot_python_semantic/resources/mdtest/type_properties/is_equivalent_to.md b/crates/ty_python_semantic/resources/mdtest/type_properties/is_equivalent_to.md similarity index 91% rename from crates/red_knot_python_semantic/resources/mdtest/type_properties/is_equivalent_to.md rename to crates/ty_python_semantic/resources/mdtest/type_properties/is_equivalent_to.md index 69efe5958a..885153d32b 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/type_properties/is_equivalent_to.md +++ b/crates/ty_python_semantic/resources/mdtest/type_properties/is_equivalent_to.md @@ -9,7 +9,7 @@ Two types `A` and `B` are equivalent iff `A` is a subtype of `B` and `B` is a su ```py from typing import Any from typing_extensions import Literal -from knot_extensions import Unknown, is_equivalent_to, static_assert +from ty_extensions import Unknown, is_equivalent_to, static_assert static_assert(is_equivalent_to(Literal[1, 2], Literal[1, 2])) static_assert(is_equivalent_to(type[object], type)) @@ -25,7 +25,7 @@ static_assert(not is_equivalent_to(Literal[1, 2], Literal[1, 2, 3])) ```py from typing_extensions import Literal -from knot_extensions import is_equivalent_to, static_assert +from ty_extensions import is_equivalent_to, static_assert static_assert(is_equivalent_to(type, type[object])) static_assert(not is_equivalent_to(Literal[1, 0], Literal[1, 2])) @@ -35,7 +35,7 @@ static_assert(not is_equivalent_to(Literal[1, 2, 3], Literal[1, 2])) ## Differently ordered intersections and unions are equivalent ```py -from knot_extensions import is_equivalent_to, static_assert, Intersection, Not +from ty_extensions import is_equivalent_to, static_assert, Intersection, Not class P: ... class Q: ... @@ -69,7 +69,7 @@ static_assert(is_equivalent_to(Intersection[Q | R, Not[P | S]], Intersection[Not ## Tuples containing equivalent but differently ordered unions/intersections are equivalent ```py -from knot_extensions import is_equivalent_to, TypeOf, static_assert, Intersection, Not +from ty_extensions import is_equivalent_to, TypeOf, static_assert, Intersection, Not from typing import Literal class P: ... @@ -87,7 +87,7 @@ static_assert( ## Unions containing tuples containing tuples containing unions (etc.) ```py -from knot_extensions import is_equivalent_to, static_assert, Intersection +from ty_extensions import is_equivalent_to, static_assert, Intersection class P: ... class Q: ... @@ -109,7 +109,7 @@ static_assert( ## Intersections containing tuples containing unions ```py -from knot_extensions import is_equivalent_to, static_assert, Intersection +from ty_extensions import is_equivalent_to, static_assert, Intersection class P: ... class Q: ... @@ -127,7 +127,7 @@ the parameter in one of the callable has a default value then the corresponding other callable should also have a default value. ```py -from knot_extensions import CallableTypeOf, is_equivalent_to, static_assert +from ty_extensions import CallableTypeOf, is_equivalent_to, static_assert from typing import Callable def f1(a: int = 1) -> None: ... @@ -163,7 +163,7 @@ static_assert(is_equivalent_to(CallableTypeOf[f5] | bool | CallableTypeOf[f6], C There are multiple cases when two callable types are not equivalent which are enumerated below. ```py -from knot_extensions import CallableTypeOf, is_equivalent_to, static_assert +from ty_extensions import CallableTypeOf, is_equivalent_to, static_assert from typing import Callable ``` @@ -249,7 +249,7 @@ Differently ordered unions inside `Callable`s inside unions can still be equival ```py from typing import Callable -from knot_extensions import is_equivalent_to, static_assert +from ty_extensions import is_equivalent_to, static_assert static_assert(is_equivalent_to(int | Callable[[int | str], None], Callable[[str | int], None] | int)) ``` @@ -276,7 +276,7 @@ def overloaded(a: Grandparent) -> None: ... ``` ```py -from knot_extensions import CallableTypeOf, is_equivalent_to, static_assert +from ty_extensions import CallableTypeOf, is_equivalent_to, static_assert from overloaded import Grandparent, Parent, Child, overloaded def grandparent(a: Grandparent) -> None: ... @@ -310,7 +310,7 @@ def cpg(a: Grandparent) -> None: ... ``` ```py -from knot_extensions import CallableTypeOf, is_equivalent_to, static_assert +from ty_extensions import CallableTypeOf, is_equivalent_to, static_assert from overloaded import pg, cpg static_assert(is_equivalent_to(CallableTypeOf[pg], CallableTypeOf[cpg])) diff --git a/crates/red_knot_python_semantic/resources/mdtest/type_properties/is_fully_static.md b/crates/ty_python_semantic/resources/mdtest/type_properties/is_fully_static.md similarity index 89% rename from crates/red_knot_python_semantic/resources/mdtest/type_properties/is_fully_static.md rename to crates/ty_python_semantic/resources/mdtest/type_properties/is_fully_static.md index 9a44ce090b..3551742960 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/type_properties/is_fully_static.md +++ b/crates/ty_python_semantic/resources/mdtest/type_properties/is_fully_static.md @@ -6,7 +6,7 @@ A type is fully static iff it does not contain any gradual forms. ```py from typing_extensions import Literal, LiteralString, Never, Callable -from knot_extensions import Intersection, Not, TypeOf, is_fully_static, static_assert +from ty_extensions import Intersection, Not, TypeOf, is_fully_static, static_assert static_assert(is_fully_static(Never)) static_assert(is_fully_static(None)) @@ -39,7 +39,7 @@ static_assert(is_fully_static(type[object])) ```py from typing_extensions import Any, Literal, LiteralString, Callable -from knot_extensions import Intersection, Not, TypeOf, Unknown, is_fully_static, static_assert +from ty_extensions import Intersection, Not, TypeOf, Unknown, is_fully_static, static_assert static_assert(not is_fully_static(Any)) static_assert(not is_fully_static(Unknown)) @@ -57,7 +57,7 @@ static_assert(not is_fully_static(type[Any])) ```py from typing_extensions import Callable, Any -from knot_extensions import Unknown, is_fully_static, static_assert +from ty_extensions import Unknown, is_fully_static, static_assert static_assert(is_fully_static(Callable[[], int])) static_assert(is_fully_static(Callable[[int, str], int])) @@ -80,7 +80,7 @@ Using function literals, we can check more variations of callable types as it al parameters without annotations and no return type. ```py -from knot_extensions import CallableTypeOf, is_fully_static, static_assert +from ty_extensions import CallableTypeOf, is_fully_static, static_assert def f00() -> None: ... def f01(a: int, b: str) -> None: ... @@ -121,7 +121,7 @@ def static(x: str) -> str: ... ``` ```py -from knot_extensions import CallableTypeOf, TypeOf, is_fully_static, static_assert +from ty_extensions import CallableTypeOf, TypeOf, is_fully_static, static_assert from overloaded import gradual, static static_assert(is_fully_static(TypeOf[gradual])) diff --git a/crates/red_knot_python_semantic/resources/mdtest/type_properties/is_gradual_equivalent_to.md b/crates/ty_python_semantic/resources/mdtest/type_properties/is_gradual_equivalent_to.md similarity index 93% rename from crates/red_knot_python_semantic/resources/mdtest/type_properties/is_gradual_equivalent_to.md rename to crates/ty_python_semantic/resources/mdtest/type_properties/is_gradual_equivalent_to.md index 98061b3103..e3de427e4e 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/type_properties/is_gradual_equivalent_to.md +++ b/crates/ty_python_semantic/resources/mdtest/type_properties/is_gradual_equivalent_to.md @@ -8,7 +8,7 @@ materializations of `B`, and all materializations of `B` are also materializatio ```py from typing import Any from typing_extensions import Literal, LiteralString, Never -from knot_extensions import AlwaysFalsy, AlwaysTruthy, TypeOf, Unknown, is_gradual_equivalent_to, static_assert +from ty_extensions import AlwaysFalsy, AlwaysTruthy, TypeOf, Unknown, is_gradual_equivalent_to, static_assert static_assert(is_gradual_equivalent_to(Any, Any)) static_assert(is_gradual_equivalent_to(Unknown, Unknown)) @@ -34,7 +34,7 @@ static_assert(not is_gradual_equivalent_to(type[object], type[Any])) ```py from typing import Any -from knot_extensions import Intersection, Not, Unknown, is_gradual_equivalent_to, static_assert +from ty_extensions import Intersection, Not, Unknown, is_gradual_equivalent_to, static_assert static_assert(is_gradual_equivalent_to(str | int, str | int)) static_assert(is_gradual_equivalent_to(str | int | Any, str | int | Unknown)) @@ -54,7 +54,7 @@ static_assert(is_gradual_equivalent_to(Unknown, Intersection[Unknown, Any])) ## Tuples ```py -from knot_extensions import Unknown, is_gradual_equivalent_to, static_assert +from ty_extensions import Unknown, is_gradual_equivalent_to, static_assert from typing import Any static_assert(is_gradual_equivalent_to(tuple[str, Any], tuple[str, Unknown])) @@ -70,7 +70,7 @@ gradual types. The cases with fully static types and using different combination are covered in the [equivalence tests](./is_equivalent_to.md#callable). ```py -from knot_extensions import Unknown, CallableTypeOf, is_gradual_equivalent_to, static_assert +from ty_extensions import Unknown, CallableTypeOf, is_gradual_equivalent_to, static_assert from typing import Any, Callable static_assert(is_gradual_equivalent_to(Callable[..., int], Callable[..., int])) diff --git a/crates/red_knot_python_semantic/resources/mdtest/type_properties/is_single_valued.md b/crates/ty_python_semantic/resources/mdtest/type_properties/is_single_valued.md similarity index 94% rename from crates/red_knot_python_semantic/resources/mdtest/type_properties/is_single_valued.md rename to crates/ty_python_semantic/resources/mdtest/type_properties/is_single_valued.md index b6339cc6b0..e947c24883 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/type_properties/is_single_valued.md +++ b/crates/ty_python_semantic/resources/mdtest/type_properties/is_single_valued.md @@ -5,7 +5,7 @@ A type is single-valued iff it is not empty and all inhabitants of it compare eq ```py import types from typing_extensions import Any, Literal, LiteralString, Never, Callable -from knot_extensions import is_single_valued, static_assert, TypeOf +from ty_extensions import is_single_valued, static_assert, TypeOf static_assert(is_single_valued(None)) static_assert(is_single_valued(Literal[True])) diff --git a/crates/red_knot_python_semantic/resources/mdtest/type_properties/is_singleton.md b/crates/ty_python_semantic/resources/mdtest/type_properties/is_singleton.md similarity index 88% rename from crates/red_knot_python_semantic/resources/mdtest/type_properties/is_singleton.md rename to crates/ty_python_semantic/resources/mdtest/type_properties/is_singleton.md index 4673affed6..a3c41449bc 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/type_properties/is_singleton.md +++ b/crates/ty_python_semantic/resources/mdtest/type_properties/is_singleton.md @@ -6,7 +6,7 @@ A type is a singleton type iff it has exactly one inhabitant. ```py from typing_extensions import Literal, Never, Callable -from knot_extensions import is_singleton, static_assert +from ty_extensions import is_singleton, static_assert static_assert(is_singleton(None)) static_assert(is_singleton(Literal[True])) @@ -39,7 +39,7 @@ python-version = "3.12" ```py from typing_extensions import _NoDefaultType -from knot_extensions import is_singleton, static_assert +from ty_extensions import is_singleton, static_assert static_assert(is_singleton(_NoDefaultType)) ``` @@ -53,7 +53,7 @@ python-version = "3.13" ```py from typing import _NoDefaultType -from knot_extensions import is_singleton, static_assert +from ty_extensions import is_singleton, static_assert static_assert(is_singleton(_NoDefaultType)) ``` @@ -72,7 +72,7 @@ python-version = "3.9" ``` ```py -from knot_extensions import is_singleton, static_assert +from ty_extensions import is_singleton, static_assert static_assert(is_singleton(Ellipsis.__class__)) static_assert(is_singleton((...).__class__)) @@ -90,7 +90,7 @@ python-version = "3.10" ```py import types -from knot_extensions import static_assert, is_singleton +from ty_extensions import static_assert, is_singleton static_assert(is_singleton(types.EllipsisType)) ``` @@ -108,7 +108,7 @@ python-version = "3.9" ``` ```py -from knot_extensions import is_singleton, static_assert +from ty_extensions import is_singleton, static_assert static_assert(is_singleton(NotImplemented.__class__)) ``` @@ -126,7 +126,7 @@ python-version = "3.10" ```py import types -from knot_extensions import static_assert, is_singleton +from ty_extensions import static_assert, is_singleton static_assert(is_singleton(types.NotImplementedType)) ``` @@ -145,7 +145,7 @@ have to hold true; it's more of a unit test for our current implementation. ```py import types from typing import Callable -from knot_extensions import static_assert, is_singleton, TypeOf +from ty_extensions import static_assert, is_singleton, TypeOf class A: def method(self): ... diff --git a/crates/red_knot_python_semantic/resources/mdtest/type_properties/is_subtype_of.md b/crates/ty_python_semantic/resources/mdtest/type_properties/is_subtype_of.md similarity index 93% rename from crates/red_knot_python_semantic/resources/mdtest/type_properties/is_subtype_of.md rename to crates/ty_python_semantic/resources/mdtest/type_properties/is_subtype_of.md index 413edf54b1..42b2f23572 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/type_properties/is_subtype_of.md +++ b/crates/ty_python_semantic/resources/mdtest/type_properties/is_subtype_of.md @@ -21,7 +21,7 @@ See the [typing documentation] for more information. as `int | float` and `int | float | complex`, respectively. ```py -from knot_extensions import is_subtype_of, static_assert, TypeOf +from ty_extensions import is_subtype_of, static_assert, TypeOf type JustFloat = TypeOf[1.0] type JustComplex = TypeOf[1j] @@ -49,7 +49,7 @@ static_assert(is_subtype_of(FloatingPointError, Exception)) ## Class hierarchies ```py -from knot_extensions import is_subtype_of, static_assert +from ty_extensions import is_subtype_of, static_assert from typing_extensions import Never class A: ... @@ -88,7 +88,7 @@ static_assert(is_subtype_of(C, object)) ```py from typing_extensions import Literal, LiteralString -from knot_extensions import is_subtype_of, static_assert, TypeOf +from ty_extensions import is_subtype_of, static_assert, TypeOf type JustFloat = TypeOf[1.0] @@ -121,7 +121,7 @@ static_assert(is_subtype_of(Literal[b"foo"], object)) ## Tuple types ```py -from knot_extensions import is_subtype_of, static_assert +from ty_extensions import is_subtype_of, static_assert class A1: ... class B1(A1): ... @@ -157,7 +157,7 @@ static_assert(is_subtype_of(tuple[int], tuple)) ## Union types ```py -from knot_extensions import is_subtype_of, static_assert +from ty_extensions import is_subtype_of, static_assert from typing import Literal class A: ... @@ -198,7 +198,7 @@ static_assert(not is_subtype_of(Literal[1, "two", 3], int)) ```py from typing_extensions import Literal, LiteralString -from knot_extensions import Intersection, Not, is_subtype_of, static_assert +from ty_extensions import Intersection, Not, is_subtype_of, static_assert class A: ... class B1(A): ... @@ -266,7 +266,7 @@ static_assert(not is_subtype_of(Literal[1], Intersection[int, Not[Literal[1]]])) ```py from typing_extensions import Literal, Never -from knot_extensions import AlwaysTruthy, AlwaysFalsy, is_subtype_of, static_assert +from ty_extensions import AlwaysTruthy, AlwaysFalsy, is_subtype_of, static_assert static_assert(is_subtype_of(Never, Never)) static_assert(is_subtype_of(Never, Literal[True])) @@ -281,7 +281,7 @@ static_assert(is_subtype_of(Never, AlwaysFalsy)) ### `AlwaysTruthy` and `AlwaysFalsy` ```py -from knot_extensions import AlwaysTruthy, AlwaysFalsy, Intersection, Not, is_subtype_of, static_assert +from ty_extensions import AlwaysTruthy, AlwaysFalsy, Intersection, Not, is_subtype_of, static_assert from typing_extensions import Literal, LiteralString static_assert(is_subtype_of(Literal[1], AlwaysTruthy)) @@ -323,7 +323,7 @@ static_assert(is_subtype_of(Intersection[LiteralString, Not[Literal["", "a"]]], ```py from types import ModuleType -from knot_extensions import TypeOf, is_subtype_of, static_assert +from ty_extensions import TypeOf, is_subtype_of, static_assert from typing_extensions import assert_type import typing @@ -335,7 +335,7 @@ static_assert(is_subtype_of(TypeOf[typing], ModuleType)) ### Slice literals ```py -from knot_extensions import TypeOf, is_subtype_of, static_assert +from ty_extensions import TypeOf, is_subtype_of, static_assert static_assert(is_subtype_of(TypeOf[1:2:3], slice)) ``` @@ -344,7 +344,7 @@ static_assert(is_subtype_of(TypeOf[1:2:3], slice)) ```py from typing import _SpecialForm, Literal -from knot_extensions import TypeOf, is_subtype_of, static_assert +from ty_extensions import TypeOf, is_subtype_of, static_assert static_assert(is_subtype_of(TypeOf[Literal], _SpecialForm)) static_assert(is_subtype_of(TypeOf[Literal], object)) @@ -359,7 +359,7 @@ static_assert(not is_subtype_of(_SpecialForm, TypeOf[Literal])) ```py from typing import _SpecialForm from typing_extensions import Literal, assert_type -from knot_extensions import TypeOf, is_subtype_of, static_assert +from ty_extensions import TypeOf, is_subtype_of, static_assert class Meta(type): ... class HasCustomMetaclass(metaclass=Meta): ... @@ -425,7 +425,7 @@ static_assert(not is_subtype_of(Meta, type[type])) ```py from typing_extensions import assert_type -from knot_extensions import TypeOf, is_subtype_of, static_assert +from ty_extensions import TypeOf, is_subtype_of, static_assert class Base: ... class Derived(Base): ... @@ -458,7 +458,7 @@ static_assert(is_subtype_of(LiteralBase | LiteralUnrelated, object)) `Any`, `Unknown`, `Todo` and derivatives thereof do not participate in subtyping. ```py -from knot_extensions import Unknown, is_subtype_of, static_assert, Intersection +from ty_extensions import Unknown, is_subtype_of, static_assert, Intersection from typing_extensions import Any static_assert(not is_subtype_of(Any, Any)) @@ -499,7 +499,7 @@ Return types are covariant. ```py from typing import Callable -from knot_extensions import is_subtype_of, static_assert, TypeOf +from ty_extensions import is_subtype_of, static_assert, TypeOf static_assert(is_subtype_of(Callable[[], int], Callable[[], float])) static_assert(not is_subtype_of(Callable[[], float], Callable[[], int])) @@ -509,7 +509,7 @@ static_assert(not is_subtype_of(Callable[[], float], Callable[[], int])) ```py from typing import Callable -from knot_extensions import is_subtype_of, static_assert, TypeOf +from ty_extensions import is_subtype_of, static_assert, TypeOf flag: bool = True @@ -535,7 +535,7 @@ Parameter types are contravariant. ```py from typing import Callable -from knot_extensions import CallableTypeOf, is_subtype_of, static_assert, TypeOf +from ty_extensions import CallableTypeOf, is_subtype_of, static_assert, TypeOf def float_param(a: float, /) -> None: ... def int_param(a: int, /) -> None: ... @@ -580,7 +580,7 @@ corresponding position in the supertype does not need to have a default value. ```py from typing import Callable -from knot_extensions import CallableTypeOf, is_subtype_of, static_assert, TypeOf +from ty_extensions import CallableTypeOf, is_subtype_of, static_assert, TypeOf def float_with_default(a: float = 1, /) -> None: ... def int_with_default(a: int = 1, /) -> None: ... @@ -626,7 +626,7 @@ If a parameter is declared as positional-only, then the corresponding parameter cannot be any other parameter kind. ```py -from knot_extensions import CallableTypeOf, is_subtype_of, static_assert +from ty_extensions import CallableTypeOf, is_subtype_of, static_assert def positional_only(a: int, /) -> None: ... def standard(a: int) -> None: ... @@ -647,7 +647,7 @@ A standard parameter is either a positional or a keyword parameter. Unlike positional-only parameters, standard parameters should have the same name in the subtype. ```py -from knot_extensions import CallableTypeOf, is_subtype_of, static_assert +from ty_extensions import CallableTypeOf, is_subtype_of, static_assert def int_param_a(a: int) -> None: ... def int_param_b(b: int) -> None: ... @@ -709,7 +709,7 @@ parameter in the subtype with the same name. This is because a standard paramete than a keyword-only parameter. ```py -from knot_extensions import CallableTypeOf, is_subtype_of, static_assert +from ty_extensions import CallableTypeOf, is_subtype_of, static_assert def standard_a(a: int) -> None: ... def keyword_b(*, b: int) -> None: ... @@ -747,7 +747,7 @@ parameter in the subtype at the same position. This is because a standard parame than a positional-only parameter. ```py -from knot_extensions import CallableTypeOf, is_subtype_of, static_assert +from ty_extensions import CallableTypeOf, is_subtype_of, static_assert def standard_a(a: int) -> None: ... def positional_b(b: int, /) -> None: ... @@ -787,7 +787,7 @@ A variadic or keyword-variadic parameter in the supertype cannot be substituted parameter in the subtype. ```py -from knot_extensions import CallableTypeOf, is_subtype_of, static_assert +from ty_extensions import CallableTypeOf, is_subtype_of, static_assert def standard(a: int) -> None: ... def variadic(*a: int) -> None: ... @@ -802,7 +802,7 @@ static_assert(not is_subtype_of(CallableTypeOf[standard], CallableTypeOf[keyword The name of the variadic parameter does not need to be the same in the subtype. ```py -from knot_extensions import CallableTypeOf, is_subtype_of, static_assert +from ty_extensions import CallableTypeOf, is_subtype_of, static_assert def variadic_float(*args2: float) -> None: ... def variadic_int(*args1: int) -> None: ... @@ -826,7 +826,7 @@ If the subtype has a variadic parameter then any unmatched positional-only param supertype should be checked against the variadic parameter. ```py -from knot_extensions import CallableTypeOf, is_subtype_of, static_assert +from ty_extensions import CallableTypeOf, is_subtype_of, static_assert def variadic(a: int, /, *args: float) -> None: ... @@ -846,7 +846,7 @@ Variadic parameter in a subtype can only be used to match against an unmatched p parameters from the supertype, not any other parameter kind. ```py -from knot_extensions import CallableTypeOf, is_subtype_of, static_assert +from ty_extensions import CallableTypeOf, is_subtype_of, static_assert def variadic(*args: int) -> None: ... @@ -914,7 +914,7 @@ static_assert(not is_subtype_of(CallableTypeOf[variadic_b], CallableTypeOf[stand For keyword-only parameters, the name should be the same: ```py -from knot_extensions import CallableTypeOf, is_subtype_of, static_assert +from ty_extensions import CallableTypeOf, is_subtype_of, static_assert def keyword_int(*, a: int) -> None: ... def keyword_float(*, a: float) -> None: ... @@ -938,7 +938,7 @@ static_assert(not is_subtype_of(CallableTypeOf[keyword_ba], CallableTypeOf[keywo #### Keyword-only with default ```py -from knot_extensions import CallableTypeOf, is_subtype_of, static_assert +from ty_extensions import CallableTypeOf, is_subtype_of, static_assert def float_with_default(*, a: float = 1) -> None: ... def int_with_default(*, a: int = 1) -> None: ... @@ -969,7 +969,7 @@ static_assert(not is_subtype_of(CallableTypeOf[int_keyword], CallableTypeOf[mixe #### Keyword-only with standard ```py -from knot_extensions import CallableTypeOf, is_subtype_of, static_assert +from ty_extensions import CallableTypeOf, is_subtype_of, static_assert def keywords1(*, a: int, b: int) -> None: ... def standard(b: float, a: float) -> None: ... @@ -1019,7 +1019,7 @@ static_assert(is_subtype_of(CallableTypeOf[mixed_variadic], CallableTypeOf[keywo The name of the keyword-variadic parameter does not need to be the same in the subtype. ```py -from knot_extensions import CallableTypeOf, is_subtype_of, static_assert +from ty_extensions import CallableTypeOf, is_subtype_of, static_assert def kwargs_float(**kwargs2: float) -> None: ... def kwargs_int(**kwargs1: int) -> None: ... @@ -1043,7 +1043,7 @@ If the subtype has a keyword-variadic parameter then any unmatched keyword-only supertype should be checked against the keyword-variadic parameter. ```py -from knot_extensions import CallableTypeOf, is_subtype_of, static_assert +from ty_extensions import CallableTypeOf, is_subtype_of, static_assert def kwargs(**kwargs: float) -> None: ... def keyword_only(*, a: int, b: float, c: bool) -> None: ... @@ -1071,7 +1071,7 @@ When the supertype has an empty list of parameters, then the subtype can have an as long as they contain the default values for non-variadic parameters. ```py -from knot_extensions import CallableTypeOf, is_subtype_of, static_assert +from ty_extensions import CallableTypeOf, is_subtype_of, static_assert def empty() -> None: ... def mixed(a: int = 1, /, b: int = 2, *args: int, c: int = 3, **kwargs: int) -> None: ... @@ -1083,7 +1083,7 @@ static_assert(not is_subtype_of(CallableTypeOf[empty], CallableTypeOf[mixed])) #### Object ```py -from knot_extensions import CallableTypeOf, is_subtype_of, static_assert, TypeOf +from ty_extensions import CallableTypeOf, is_subtype_of, static_assert, TypeOf from typing import Callable def f1(a: int, b: str, /, *c: float, d: int = 1, **e: float) -> None: ... @@ -1108,7 +1108,7 @@ static_assert(not is_subtype_of(object, TypeOf[C.foo])) ```py from typing import Callable -from knot_extensions import TypeOf, is_subtype_of, static_assert, is_assignable_to +from ty_extensions import TypeOf, is_subtype_of, static_assert, is_assignable_to class A: def __call__(self, a: int) -> int: @@ -1132,7 +1132,7 @@ f(a) ```py from typing import Callable, overload from typing_extensions import Self -from knot_extensions import TypeOf, static_assert, is_subtype_of +from ty_extensions import TypeOf, static_assert, is_subtype_of class MetaWithReturn(type): def __call__(cls) -> "A": @@ -1170,7 +1170,7 @@ static_assert(is_subtype_of(TypeOf[C], Callable[[], str])) ```py from typing import Callable -from knot_extensions import TypeOf, static_assert, is_subtype_of +from ty_extensions import TypeOf, static_assert, is_subtype_of class A: def __new__(cls, a: int) -> int: @@ -1202,7 +1202,7 @@ If `__call__` and `__new__` are both present, `__call__` takes precedence. ```py from typing import Callable -from knot_extensions import TypeOf, static_assert, is_subtype_of +from ty_extensions import TypeOf, static_assert, is_subtype_of class MetaWithIntReturn(type): def __call__(cls) -> int: @@ -1220,7 +1220,7 @@ static_assert(not is_subtype_of(TypeOf[F], Callable[[], str])) ```py from typing import Callable -from knot_extensions import TypeOf, static_assert, is_subtype_of +from ty_extensions import TypeOf, static_assert, is_subtype_of class A: def f(self, a: int) -> int: @@ -1267,7 +1267,7 @@ def overloaded(x: B) -> None: ... ``` ```py -from knot_extensions import CallableTypeOf, is_subtype_of, static_assert +from ty_extensions import CallableTypeOf, is_subtype_of, static_assert from overloaded import A, B, C, overloaded def accepts_a(x: A) -> None: ... @@ -1302,7 +1302,7 @@ def overloaded(a: Grandparent) -> None: ... ``` ```py -from knot_extensions import CallableTypeOf, is_subtype_of, static_assert +from ty_extensions import CallableTypeOf, is_subtype_of, static_assert from overloaded import Grandparent, Parent, Child, overloaded # This is a subtype of only the first overload @@ -1373,7 +1373,7 @@ def empty_cp(a: Parent) -> None: ... ``` ```py -from knot_extensions import CallableTypeOf, is_subtype_of, static_assert +from ty_extensions import CallableTypeOf, is_subtype_of, static_assert from overloaded import pg, po, go, cpg, empty_go, empty_cp static_assert(is_subtype_of(CallableTypeOf[pg], CallableTypeOf[cpg])) @@ -1420,7 +1420,7 @@ def overload_ba(x: A) -> None: ... ```py from overloaded import overload_ab, overload_ba -from knot_extensions import CallableTypeOf, is_subtype_of, static_assert +from ty_extensions import CallableTypeOf, is_subtype_of, static_assert static_assert(is_subtype_of(CallableTypeOf[overload_ab], CallableTypeOf[overload_ba])) static_assert(is_subtype_of(CallableTypeOf[overload_ba], CallableTypeOf[overload_ab])) diff --git a/crates/red_knot_python_semantic/resources/mdtest/type_properties/str_repr.md b/crates/ty_python_semantic/resources/mdtest/type_properties/str_repr.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/type_properties/str_repr.md rename to crates/ty_python_semantic/resources/mdtest/type_properties/str_repr.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/type_properties/truthiness.md b/crates/ty_python_semantic/resources/mdtest/type_properties/truthiness.md similarity index 93% rename from crates/red_knot_python_semantic/resources/mdtest/type_properties/truthiness.md rename to crates/ty_python_semantic/resources/mdtest/type_properties/truthiness.md index 00e7c09539..4cb8bdbc45 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/type_properties/truthiness.md +++ b/crates/ty_python_semantic/resources/mdtest/type_properties/truthiness.md @@ -4,7 +4,7 @@ ```py from typing_extensions import Literal, LiteralString -from knot_extensions import AlwaysFalsy, AlwaysTruthy +from ty_extensions import AlwaysFalsy, AlwaysTruthy def _( a: Literal[1], @@ -94,8 +94,8 @@ reveal_type(bool(PossiblyUnboundTrue())) # revealed: bool ### Special-cased classes -Some special-cased `@final` classes are known by red-knot to have instances that are either always -truthy or always falsy. +Some special-cased `@final` classes are known by ty to have instances that are either always truthy +or always falsy. ```toml [environment] @@ -106,7 +106,7 @@ python-version = "3.12" import types import typing import sys -from knot_extensions import AlwaysTruthy, static_assert, is_subtype_of +from ty_extensions import AlwaysTruthy, static_assert, is_subtype_of from typing_extensions import _NoDefaultType static_assert(is_subtype_of(sys.version_info.__class__, AlwaysTruthy)) diff --git a/crates/red_knot_python_semantic/resources/mdtest/type_properties/tuples_containing_never.md b/crates/ty_python_semantic/resources/mdtest/type_properties/tuples_containing_never.md similarity index 96% rename from crates/red_knot_python_semantic/resources/mdtest/type_properties/tuples_containing_never.md rename to crates/ty_python_semantic/resources/mdtest/type_properties/tuples_containing_never.md index b0a1ad3077..5536b84c98 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/type_properties/tuples_containing_never.md +++ b/crates/ty_python_semantic/resources/mdtest/type_properties/tuples_containing_never.md @@ -10,7 +10,7 @@ zero element in multiplication, similar to how a Cartesian product with the empt set. ```py -from knot_extensions import static_assert, is_equivalent_to +from ty_extensions import static_assert, is_equivalent_to from typing_extensions import Never, NoReturn static_assert(is_equivalent_to(Never, tuple[Never])) diff --git a/crates/red_knot_python_semantic/resources/mdtest/type_qualifiers/classvar.md b/crates/ty_python_semantic/resources/mdtest/type_qualifiers/classvar.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/type_qualifiers/classvar.md rename to crates/ty_python_semantic/resources/mdtest/type_qualifiers/classvar.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/type_qualifiers/final.md b/crates/ty_python_semantic/resources/mdtest/type_qualifiers/final.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/type_qualifiers/final.md rename to crates/ty_python_semantic/resources/mdtest/type_qualifiers/final.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/typed_dict.md b/crates/ty_python_semantic/resources/mdtest/typed_dict.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/typed_dict.md rename to crates/ty_python_semantic/resources/mdtest/typed_dict.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/unary/custom.md b/crates/ty_python_semantic/resources/mdtest/unary/custom.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/unary/custom.md rename to crates/ty_python_semantic/resources/mdtest/unary/custom.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/unary/integers.md b/crates/ty_python_semantic/resources/mdtest/unary/integers.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/unary/integers.md rename to crates/ty_python_semantic/resources/mdtest/unary/integers.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/unary/invert_add_usub.md b/crates/ty_python_semantic/resources/mdtest/unary/invert_add_usub.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/unary/invert_add_usub.md rename to crates/ty_python_semantic/resources/mdtest/unary/invert_add_usub.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/unary/not.md b/crates/ty_python_semantic/resources/mdtest/unary/not.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/unary/not.md rename to crates/ty_python_semantic/resources/mdtest/unary/not.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/union_types.md b/crates/ty_python_semantic/resources/mdtest/union_types.md similarity index 96% rename from crates/red_knot_python_semantic/resources/mdtest/union_types.md rename to crates/ty_python_semantic/resources/mdtest/union_types.md index 398847ecbe..50d20efb12 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/union_types.md +++ b/crates/ty_python_semantic/resources/mdtest/union_types.md @@ -117,7 +117,7 @@ def _( ## Do not erase `Unknown` ```py -from knot_extensions import Unknown +from ty_extensions import Unknown def _(u1: Unknown | str, u2: str | Unknown) -> None: reveal_type(u1) # revealed: Unknown | str @@ -130,7 +130,7 @@ Since `Unknown` is a gradual type, it is not a subtype of anything, but multiple union are still redundant: ```py -from knot_extensions import Unknown +from ty_extensions import Unknown def _(u1: Unknown | Unknown | str, u2: Unknown | str | Unknown, u3: str | Unknown | Unknown) -> None: reveal_type(u1) # revealed: Unknown | str @@ -143,7 +143,7 @@ def _(u1: Unknown | Unknown | str, u2: Unknown | str | Unknown, u3: str | Unknow Simplifications still apply when `Unknown` is present. ```py -from knot_extensions import Unknown +from ty_extensions import Unknown def _(u1: int | Unknown | bool) -> None: reveal_type(u1) # revealed: int | Unknown @@ -154,7 +154,7 @@ def _(u1: int | Unknown | bool) -> None: We can simplify unions of intersections: ```py -from knot_extensions import Intersection, Not +from ty_extensions import Intersection, Not class P: ... class Q: ... @@ -176,7 +176,7 @@ python-version = "3.12" ```py from typing import Literal -from knot_extensions import AlwaysTruthy, AlwaysFalsy +from ty_extensions import AlwaysTruthy, AlwaysFalsy type strings = Literal["foo", ""] type ints = Literal[0, 1] diff --git a/crates/red_knot_python_semantic/resources/mdtest/unpacking.md b/crates/ty_python_semantic/resources/mdtest/unpacking.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/unpacking.md rename to crates/ty_python_semantic/resources/mdtest/unpacking.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/unreachable.md b/crates/ty_python_semantic/resources/mdtest/unreachable.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/unreachable.md rename to crates/ty_python_semantic/resources/mdtest/unreachable.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/with/async.md b/crates/ty_python_semantic/resources/mdtest/with/async.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/with/async.md rename to crates/ty_python_semantic/resources/mdtest/with/async.md diff --git a/crates/red_knot_python_semantic/resources/mdtest/with/sync.md b/crates/ty_python_semantic/resources/mdtest/with/sync.md similarity index 100% rename from crates/red_knot_python_semantic/resources/mdtest/with/sync.md rename to crates/ty_python_semantic/resources/mdtest/with/sync.md diff --git a/crates/red_knot_python_semantic/resources/primer/bad.txt b/crates/ty_python_semantic/resources/primer/bad.txt similarity index 100% rename from crates/red_knot_python_semantic/resources/primer/bad.txt rename to crates/ty_python_semantic/resources/primer/bad.txt diff --git a/crates/red_knot_python_semantic/resources/primer/good.txt b/crates/ty_python_semantic/resources/primer/good.txt similarity index 100% rename from crates/red_knot_python_semantic/resources/primer/good.txt rename to crates/ty_python_semantic/resources/primer/good.txt diff --git a/crates/red_knot_python_semantic/src/ast_node_ref.rs b/crates/ty_python_semantic/src/ast_node_ref.rs similarity index 100% rename from crates/red_knot_python_semantic/src/ast_node_ref.rs rename to crates/ty_python_semantic/src/ast_node_ref.rs diff --git a/crates/red_knot_python_semantic/src/db.rs b/crates/ty_python_semantic/src/db.rs similarity index 98% rename from crates/red_knot_python_semantic/src/db.rs rename to crates/ty_python_semantic/src/db.rs index 00956ccf07..5fff691aac 100644 --- a/crates/red_knot_python_semantic/src/db.rs +++ b/crates/ty_python_semantic/src/db.rs @@ -48,7 +48,7 @@ pub(crate) mod tests { Self { storage: salsa::Storage::default(), system: TestSystem::default(), - vendored: red_knot_vendored::file_system().clone(), + vendored: ty_vendored::file_system().clone(), events: Arc::default(), files: Files::default(), rule_selection: Arc::new(RuleSelection::from_registry(default_lint_registry())), diff --git a/crates/red_knot_python_semantic/src/lib.rs b/crates/ty_python_semantic/src/lib.rs similarity index 100% rename from crates/red_knot_python_semantic/src/lib.rs rename to crates/ty_python_semantic/src/lib.rs diff --git a/crates/red_knot_python_semantic/src/lint.rs b/crates/ty_python_semantic/src/lint.rs similarity index 99% rename from crates/red_knot_python_semantic/src/lint.rs rename to crates/ty_python_semantic/src/lint.rs index 0e22953666..17a778696a 100644 --- a/crates/red_knot_python_semantic/src/lint.rs +++ b/crates/ty_python_semantic/src/lint.rs @@ -210,8 +210,8 @@ impl LintStatus { /// Declares a lint rule with the given metadata. /// /// ```rust -/// use red_knot_python_semantic::declare_lint; -/// use red_knot_python_semantic::lint::{LintStatus, Level}; +/// use ty_python_semantic::declare_lint; +/// use ty_python_semantic::lint::{LintStatus, Level}; /// /// declare_lint! { /// /// ## What it does diff --git a/crates/red_knot_python_semantic/src/list.rs b/crates/ty_python_semantic/src/list.rs similarity index 100% rename from crates/red_knot_python_semantic/src/list.rs rename to crates/ty_python_semantic/src/list.rs diff --git a/crates/red_knot_python_semantic/src/module_name.rs b/crates/ty_python_semantic/src/module_name.rs similarity index 96% rename from crates/red_knot_python_semantic/src/module_name.rs rename to crates/ty_python_semantic/src/module_name.rs index 9d08cec93e..48162fe3d9 100644 --- a/crates/red_knot_python_semantic/src/module_name.rs +++ b/crates/ty_python_semantic/src/module_name.rs @@ -47,7 +47,7 @@ impl ModuleName { /// ## Examples /// /// ``` - /// use red_knot_python_semantic::ModuleName; + /// use ty_python_semantic::ModuleName; /// /// assert_eq!(ModuleName::new_static("foo.bar").as_deref(), Some("foo.bar")); /// assert_eq!(ModuleName::new_static(""), None); @@ -73,7 +73,7 @@ impl ModuleName { /// # Examples /// /// ``` - /// use red_knot_python_semantic::ModuleName; + /// use ty_python_semantic::ModuleName; /// /// assert_eq!(ModuleName::new_static("foo.bar.baz").unwrap().components().collect::>(), vec!["foo", "bar", "baz"]); /// ``` @@ -87,7 +87,7 @@ impl ModuleName { /// # Examples /// /// ``` - /// use red_knot_python_semantic::ModuleName; + /// use ty_python_semantic::ModuleName; /// /// assert_eq!(ModuleName::new_static("foo.bar").unwrap().parent(), Some(ModuleName::new_static("foo").unwrap())); /// assert_eq!(ModuleName::new_static("foo.bar.baz").unwrap().parent(), Some(ModuleName::new_static("foo.bar").unwrap())); @@ -106,7 +106,7 @@ impl ModuleName { /// # Examples /// /// ``` - /// use red_knot_python_semantic::ModuleName; + /// use ty_python_semantic::ModuleName; /// /// assert!(ModuleName::new_static("foo.bar").unwrap().starts_with(&ModuleName::new_static("foo").unwrap())); /// @@ -138,7 +138,7 @@ impl ModuleName { /// # Examples /// /// ``` - /// use red_knot_python_semantic::ModuleName; + /// use ty_python_semantic::ModuleName; /// /// assert_eq!(&*ModuleName::from_components(["a"]).unwrap(), "a"); /// assert_eq!(&*ModuleName::from_components(["a", "b"]).unwrap(), "a.b"); @@ -179,7 +179,7 @@ impl ModuleName { /// # Examples /// /// ``` - /// use red_knot_python_semantic::ModuleName; + /// use ty_python_semantic::ModuleName; /// /// let mut module_name = ModuleName::new_static("foo").unwrap(); /// module_name.extend(&ModuleName::new_static("bar").unwrap()); @@ -197,7 +197,7 @@ impl ModuleName { /// # Examples /// /// ``` - /// use red_knot_python_semantic::ModuleName; + /// use ty_python_semantic::ModuleName; /// /// assert_eq!( /// ModuleName::new_static("foo.bar.baz").unwrap().ancestors().collect::>(), diff --git a/crates/red_knot_python_semantic/src/module_resolver/mod.rs b/crates/ty_python_semantic/src/module_resolver/mod.rs similarity index 100% rename from crates/red_knot_python_semantic/src/module_resolver/mod.rs rename to crates/ty_python_semantic/src/module_resolver/mod.rs diff --git a/crates/red_knot_python_semantic/src/module_resolver/module.rs b/crates/ty_python_semantic/src/module_resolver/module.rs similarity index 96% rename from crates/red_knot_python_semantic/src/module_resolver/module.rs rename to crates/ty_python_semantic/src/module_resolver/module.rs index afcc6687ba..ecd8959f2d 100644 --- a/crates/red_knot_python_semantic/src/module_resolver/module.rs +++ b/crates/ty_python_semantic/src/module_resolver/module.rs @@ -119,7 +119,7 @@ pub enum KnownModule { Dataclasses, Collections, Inspect, - KnotExtensions, + TyExtensions, } impl KnownModule { @@ -136,7 +136,7 @@ impl KnownModule { Self::Dataclasses => "dataclasses", Self::Collections => "collections", Self::Inspect => "inspect", - Self::KnotExtensions => "knot_extensions", + Self::TyExtensions => "ty_extensions", } } @@ -164,8 +164,8 @@ impl KnownModule { matches!(self, Self::Typing) } - pub const fn is_knot_extensions(self) -> bool { - matches!(self, Self::KnotExtensions) + pub const fn is_ty_extensions(self) -> bool { + matches!(self, Self::TyExtensions) } pub const fn is_inspect(self) -> bool { diff --git a/crates/red_knot_python_semantic/src/module_resolver/path.rs b/crates/ty_python_semantic/src/module_resolver/path.rs similarity index 100% rename from crates/red_knot_python_semantic/src/module_resolver/path.rs rename to crates/ty_python_semantic/src/module_resolver/path.rs diff --git a/crates/red_knot_python_semantic/src/module_resolver/resolver.rs b/crates/ty_python_semantic/src/module_resolver/resolver.rs similarity index 100% rename from crates/red_knot_python_semantic/src/module_resolver/resolver.rs rename to crates/ty_python_semantic/src/module_resolver/resolver.rs diff --git a/crates/red_knot_python_semantic/src/module_resolver/testing.rs b/crates/ty_python_semantic/src/module_resolver/testing.rs similarity index 100% rename from crates/red_knot_python_semantic/src/module_resolver/testing.rs rename to crates/ty_python_semantic/src/module_resolver/testing.rs diff --git a/crates/red_knot_python_semantic/src/module_resolver/typeshed.rs b/crates/ty_python_semantic/src/module_resolver/typeshed.rs similarity index 99% rename from crates/red_knot_python_semantic/src/module_resolver/typeshed.rs rename to crates/ty_python_semantic/src/module_resolver/typeshed.rs index 8a3fe2e645..fdfdac7527 100644 --- a/crates/red_knot_python_semantic/src/module_resolver/typeshed.rs +++ b/crates/ty_python_semantic/src/module_resolver/typeshed.rs @@ -392,7 +392,7 @@ mod tests { let db = TestDb::new(); let vendored_typeshed_versions = vendored_typeshed_versions(&db); let vendored_typeshed_dir = - Path::new(env!("CARGO_MANIFEST_DIR")).join("../red_knot_vendored/vendor/typeshed"); + Path::new(env!("CARGO_MANIFEST_DIR")).join("../ty_vendored/vendor/typeshed"); let mut empty_iterator = true; diff --git a/crates/red_knot_python_semantic/src/node_key.rs b/crates/ty_python_semantic/src/node_key.rs similarity index 100% rename from crates/red_knot_python_semantic/src/node_key.rs rename to crates/ty_python_semantic/src/node_key.rs diff --git a/crates/red_knot_python_semantic/src/program.rs b/crates/ty_python_semantic/src/program.rs similarity index 98% rename from crates/red_knot_python_semantic/src/program.rs rename to crates/ty_python_semantic/src/program.rs index af3bbe0ce2..682a055114 100644 --- a/crates/red_knot_python_semantic/src/program.rs +++ b/crates/ty_python_semantic/src/program.rs @@ -111,7 +111,7 @@ pub struct SearchPathSettings { /// bundled as a zip file in the binary pub custom_typeshed: Option, - /// Path to the Python installation from which Red Knot resolves third party dependencies + /// Path to the Python installation from which ty resolves third party dependencies /// and their type information. pub python_path: PythonPath, } diff --git a/crates/red_knot_python_semantic/src/python_platform.rs b/crates/ty_python_semantic/src/python_platform.rs similarity index 100% rename from crates/red_knot_python_semantic/src/python_platform.rs rename to crates/ty_python_semantic/src/python_platform.rs diff --git a/crates/red_knot_python_semantic/src/semantic_index.rs b/crates/ty_python_semantic/src/semantic_index.rs similarity index 100% rename from crates/red_knot_python_semantic/src/semantic_index.rs rename to crates/ty_python_semantic/src/semantic_index.rs diff --git a/crates/red_knot_python_semantic/src/semantic_index/ast_ids.rs b/crates/ty_python_semantic/src/semantic_index/ast_ids.rs similarity index 100% rename from crates/red_knot_python_semantic/src/semantic_index/ast_ids.rs rename to crates/ty_python_semantic/src/semantic_index/ast_ids.rs diff --git a/crates/red_knot_python_semantic/src/semantic_index/builder.rs b/crates/ty_python_semantic/src/semantic_index/builder.rs similarity index 100% rename from crates/red_knot_python_semantic/src/semantic_index/builder.rs rename to crates/ty_python_semantic/src/semantic_index/builder.rs diff --git a/crates/red_knot_python_semantic/src/semantic_index/builder/except_handlers.rs b/crates/ty_python_semantic/src/semantic_index/builder/except_handlers.rs similarity index 100% rename from crates/red_knot_python_semantic/src/semantic_index/builder/except_handlers.rs rename to crates/ty_python_semantic/src/semantic_index/builder/except_handlers.rs diff --git a/crates/red_knot_python_semantic/src/semantic_index/definition.rs b/crates/ty_python_semantic/src/semantic_index/definition.rs similarity index 100% rename from crates/red_knot_python_semantic/src/semantic_index/definition.rs rename to crates/ty_python_semantic/src/semantic_index/definition.rs diff --git a/crates/red_knot_python_semantic/src/semantic_index/expression.rs b/crates/ty_python_semantic/src/semantic_index/expression.rs similarity index 100% rename from crates/red_knot_python_semantic/src/semantic_index/expression.rs rename to crates/ty_python_semantic/src/semantic_index/expression.rs diff --git a/crates/red_knot_python_semantic/src/semantic_index/narrowing_constraints.rs b/crates/ty_python_semantic/src/semantic_index/narrowing_constraints.rs similarity index 100% rename from crates/red_knot_python_semantic/src/semantic_index/narrowing_constraints.rs rename to crates/ty_python_semantic/src/semantic_index/narrowing_constraints.rs diff --git a/crates/red_knot_python_semantic/src/semantic_index/predicate.rs b/crates/ty_python_semantic/src/semantic_index/predicate.rs similarity index 100% rename from crates/red_knot_python_semantic/src/semantic_index/predicate.rs rename to crates/ty_python_semantic/src/semantic_index/predicate.rs diff --git a/crates/red_knot_python_semantic/src/semantic_index/re_exports.rs b/crates/ty_python_semantic/src/semantic_index/re_exports.rs similarity index 100% rename from crates/red_knot_python_semantic/src/semantic_index/re_exports.rs rename to crates/ty_python_semantic/src/semantic_index/re_exports.rs diff --git a/crates/red_knot_python_semantic/src/semantic_index/symbol.rs b/crates/ty_python_semantic/src/semantic_index/symbol.rs similarity index 100% rename from crates/red_knot_python_semantic/src/semantic_index/symbol.rs rename to crates/ty_python_semantic/src/semantic_index/symbol.rs diff --git a/crates/red_knot_python_semantic/src/semantic_index/use_def.rs b/crates/ty_python_semantic/src/semantic_index/use_def.rs similarity index 100% rename from crates/red_knot_python_semantic/src/semantic_index/use_def.rs rename to crates/ty_python_semantic/src/semantic_index/use_def.rs diff --git a/crates/red_knot_python_semantic/src/semantic_index/use_def/symbol_state.rs b/crates/ty_python_semantic/src/semantic_index/use_def/symbol_state.rs similarity index 100% rename from crates/red_knot_python_semantic/src/semantic_index/use_def/symbol_state.rs rename to crates/ty_python_semantic/src/semantic_index/use_def/symbol_state.rs diff --git a/crates/red_knot_python_semantic/src/semantic_index/visibility_constraints.rs b/crates/ty_python_semantic/src/semantic_index/visibility_constraints.rs similarity index 100% rename from crates/red_knot_python_semantic/src/semantic_index/visibility_constraints.rs rename to crates/ty_python_semantic/src/semantic_index/visibility_constraints.rs diff --git a/crates/red_knot_python_semantic/src/semantic_model.rs b/crates/ty_python_semantic/src/semantic_model.rs similarity index 100% rename from crates/red_knot_python_semantic/src/semantic_model.rs rename to crates/ty_python_semantic/src/semantic_model.rs diff --git a/crates/red_knot_python_semantic/src/site_packages.rs b/crates/ty_python_semantic/src/site_packages.rs similarity index 99% rename from crates/red_knot_python_semantic/src/site_packages.rs rename to crates/ty_python_semantic/src/site_packages.rs index c4b76d877e..a11274378b 100644 --- a/crates/red_knot_python_semantic/src/site_packages.rs +++ b/crates/ty_python_semantic/src/site_packages.rs @@ -4,7 +4,7 @@ //! The routines exposed by this module have different behaviour depending //! on the platform of the *host machine*, which may be //! different from the *target platform for type checking*. (A user -//! might be running red-knot on a Windows machine, but might +//! might be running ty on a Windows machine, but might //! reasonably ask us to type-check code assuming that the code runs //! on Linux.) diff --git a/crates/red_knot_python_semantic/src/suppression.rs b/crates/ty_python_semantic/src/suppression.rs similarity index 96% rename from crates/red_knot_python_semantic/src/suppression.rs rename to crates/ty_python_semantic/src/suppression.rs index ebfc62afd8..dcccf57194 100644 --- a/crates/red_knot_python_semantic/src/suppression.rs +++ b/crates/ty_python_semantic/src/suppression.rs @@ -14,7 +14,7 @@ use thiserror::Error; declare_lint! { /// ## What it does - /// Checks for `type: ignore` or `knot: ignore` directives that are no longer applicable. + /// Checks for `type: ignore` or `ty: ignore` directives that are no longer applicable. /// /// ## Why is this bad? /// A `type: ignore` directive that no longer matches any diagnostic violations is likely @@ -22,7 +22,7 @@ declare_lint! { /// /// ## Examples /// ```py - /// a = 20 / 2 # knot: ignore[division-by-zero] + /// a = 20 / 2 # ty: ignore[division-by-zero] /// ``` /// /// Use instead: @@ -39,24 +39,24 @@ declare_lint! { declare_lint! { /// ## What it does - /// Checks for `knot: ignore[code]` where `code` isn't a known lint rule. + /// Checks for `ty: ignore[code]` where `code` isn't a known lint rule. /// /// ## Why is this bad? - /// A `knot: ignore[code]` directive with a `code` that doesn't match + /// A `ty: ignore[code]` directive with a `code` that doesn't match /// any known rule will not suppress any type errors, and is probably a mistake. /// /// ## Examples /// ```py - /// a = 20 / 0 # knot: ignore[division-by-zer] + /// a = 20 / 0 # ty: ignore[division-by-zer] /// ``` /// /// Use instead: /// /// ```py - /// a = 20 / 0 # knot: ignore[division-by-zero] + /// a = 20 / 0 # ty: ignore[division-by-zero] /// ``` pub(crate) static UNKNOWN_RULE = { - summary: "detects `knot: ignore` comments that reference unknown rules", + summary: "detects `ty: ignore` comments that reference unknown rules", status: LintStatus::preview("1.0.0"), default_level: Level::Warn, } @@ -64,7 +64,7 @@ declare_lint! { declare_lint! { /// ## What it does - /// Checks for `type: ignore` and `knot: ignore` comments that are syntactically incorrect. + /// Checks for `type: ignore` and `ty: ignore` comments that are syntactically incorrect. /// /// ## Why is this bad? /// A syntactically incorrect ignore comment is probably a mistake and is useless. @@ -141,7 +141,7 @@ pub(crate) fn check_suppressions(db: &dyn Db, file: File, diagnostics: &mut Type check_unused_suppressions(&mut context); } -/// Checks for `knot: ignore` comments that reference unknown rules. +/// Checks for `ty: ignore` comments that reference unknown rules. fn check_unknown_rule(context: &mut CheckSuppressionsContext) { if context.is_lint_disabled(&UNKNOWN_RULE) { return; @@ -241,7 +241,7 @@ fn check_unused_suppressions(context: &mut CheckSuppressionsContext) { // This looks silly but it's necessary to check again if a `unused-ignore-comment` is indeed unused // in case the "unused" directive comes after it: // ```py - // a = 10 / 2 # knot: ignore[unused-ignore-comment, division-by-zero] + // a = 10 / 2 # ty: ignore[unused-ignore-comment, division-by-zero] // ``` if context.diagnostics.is_used(suppression.id()) { continue; @@ -416,7 +416,7 @@ impl<'a> IntoIterator for &'a Suppressions { } } -/// A `type: ignore` or `knot: ignore` suppression. +/// A `type: ignore` or `ty: ignore` suppression. /// /// Suppression comments that suppress multiple codes /// create multiple suppressions: one for every code. @@ -474,7 +474,7 @@ enum SuppressionTarget { /// Suppress the lint with the given id Lint(LintId), - /// Suppresses no lint, e.g. `knot: ignore[]` + /// Suppresses no lint, e.g. `ty: ignore[]` Empty, } @@ -577,7 +577,7 @@ impl<'a> SuppressionsBuilder<'a> { }); } - // `knot: ignore[]` + // `ty: ignore[]` Some([]) => { self.line.push(Suppression { target: SuppressionTarget::Empty, @@ -588,7 +588,7 @@ impl<'a> SuppressionsBuilder<'a> { }); } - // `knot: ignore[a, b]` + // `ty: ignore[a, b]` Some(codes) => { for code_range in codes { let code = &self.source[*code_range]; @@ -695,8 +695,8 @@ impl<'src> SuppressionParser<'src> { fn eat_kind(&mut self) -> Option { let kind = if self.cursor.as_str().starts_with("type") { SuppressionKind::TypeIgnore - } else if self.cursor.as_str().starts_with("knot") { - SuppressionKind::Knot + } else if self.cursor.as_str().starts_with("ty") { + SuppressionKind::Ty } else { return None; }; @@ -737,7 +737,7 @@ impl<'src> SuppressionParser<'src> { self.eat_whitespace(); - // `knot: ignore[]` or `knot: ignore[a,]` + // `ty: ignore[]` or `ty: ignore[a,]` if self.cursor.eat_char(']') { break Ok(Some(codes)); } @@ -757,7 +757,7 @@ impl<'src> SuppressionParser<'src> { if self.cursor.eat_char(']') { break Ok(Some(codes)); } - // `knot: ignore[a b] + // `ty: ignore[a b] return self.syntax_error(ParseErrorKind::CodesMissingComma(kind)); } } @@ -843,7 +843,7 @@ struct SuppressionComment { #[derive(Copy, Clone, Debug, Eq, PartialEq)] enum SuppressionKind { TypeIgnore, - Knot, + Ty, } impl SuppressionKind { @@ -854,7 +854,7 @@ impl SuppressionKind { fn len_utf8(self) -> usize { match self { SuppressionKind::TypeIgnore => "type".len(), - SuppressionKind::Knot => "knot".len(), + SuppressionKind::Ty => "ty".len(), } } } @@ -863,7 +863,7 @@ impl fmt::Display for SuppressionKind { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { match self { SuppressionKind::TypeIgnore => f.write_str("type: ignore"), - SuppressionKind::Knot => f.write_str("knot: ignore"), + SuppressionKind::Ty => f.write_str("ty: ignore"), } } } @@ -911,11 +911,11 @@ enum ParseErrorKind { #[error("expected a comma separating the rule codes")] CodesMissingComma(SuppressionKind), - /// `knot: ignore[*.*]` + /// `ty: ignore[*.*]` #[error("expected a alphanumeric character or `-` or `_` as code")] InvalidCode(SuppressionKind), - /// `knot: ignore[a, b` + /// `ty: ignore[a, b` #[error("expected a closing bracket")] CodesMissingClosingBracket(SuppressionKind), } diff --git a/crates/red_knot_python_semantic/src/symbol.rs b/crates/ty_python_semantic/src/symbol.rs similarity index 100% rename from crates/red_knot_python_semantic/src/symbol.rs rename to crates/ty_python_semantic/src/symbol.rs diff --git a/crates/red_knot_python_semantic/src/types.rs b/crates/ty_python_semantic/src/types.rs similarity index 99% rename from crates/red_knot_python_semantic/src/types.rs rename to crates/ty_python_semantic/src/types.rs index 049f2de3be..cd4d4b0fae 100644 --- a/crates/red_knot_python_semantic/src/types.rs +++ b/crates/ty_python_semantic/src/types.rs @@ -257,7 +257,7 @@ fn member_lookup_cycle_initial<'db>( Symbol::bound(Type::Never).into() } -/// Meta data for `Type::Todo`, which represents a known limitation in red-knot. +/// Meta data for `Type::Todo`, which represents a known limitation in ty. #[cfg(debug_assertions)] #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] pub struct TodoType(pub &'static str); @@ -1246,7 +1246,7 @@ impl<'db> Type<'db> { .metaclass_instance_type(db) .is_subtype_of(db, target), - // `type[str]` (== `SubclassOf("str")` in red-knot) describes all possible runtime subclasses + // `type[str]` (== `SubclassOf("str")` in ty) describes all possible runtime subclasses // of the class object `str`. It is a subtype of `type` (== `Instance("type")`) because `str` // is an instance of `type`, and so all possible subclasses of `str` will also be instances of `type`. // @@ -5379,7 +5379,7 @@ pub enum DynamicType { Unknown, /// Temporary type for symbols that can't be inferred yet because of missing implementations. /// - /// This variant should eventually be removed once red-knot is spec-compliant. + /// This variant should eventually be removed once ty is spec-compliant. /// /// General rule: `Todo` should only propagate when the presence of the input `Todo` caused the /// output to be unknown. An output should only be `Todo` if fixing all `Todo` inputs to be not @@ -6906,25 +6906,25 @@ pub enum KnownFunction { /// `inspect.getattr_static` GetattrStatic, - /// `knot_extensions.static_assert` + /// `ty_extensions.static_assert` StaticAssert, - /// `knot_extensions.is_equivalent_to` + /// `ty_extensions.is_equivalent_to` IsEquivalentTo, - /// `knot_extensions.is_subtype_of` + /// `ty_extensions.is_subtype_of` IsSubtypeOf, - /// `knot_extensions.is_assignable_to` + /// `ty_extensions.is_assignable_to` IsAssignableTo, - /// `knot_extensions.is_disjoint_from` + /// `ty_extensions.is_disjoint_from` IsDisjointFrom, - /// `knot_extensions.is_gradual_equivalent_to` + /// `ty_extensions.is_gradual_equivalent_to` IsGradualEquivalentTo, - /// `knot_extensions.is_fully_static` + /// `ty_extensions.is_fully_static` IsFullyStatic, - /// `knot_extensions.is_singleton` + /// `ty_extensions.is_singleton` IsSingleton, - /// `knot_extensions.is_single_valued` + /// `ty_extensions.is_single_valued` IsSingleValued, - /// `knot_extensions.generic_context` + /// `ty_extensions.generic_context` GenericContext, } @@ -6982,7 +6982,7 @@ impl KnownFunction { | Self::IsSingleton | Self::IsSubtypeOf | Self::GenericContext - | Self::StaticAssert => module.is_knot_extensions(), + | Self::StaticAssert => module.is_ty_extensions(), } } } @@ -8385,7 +8385,7 @@ pub(crate) mod tests { | KnownFunction::IsSingleValued | KnownFunction::IsAssignableTo | KnownFunction::IsEquivalentTo - | KnownFunction::IsGradualEquivalentTo => KnownModule::KnotExtensions, + | KnownFunction::IsGradualEquivalentTo => KnownModule::TyExtensions, }; let function_definition = known_module_symbol(&db, module, function_name) diff --git a/crates/red_knot_python_semantic/src/types/builder.rs b/crates/ty_python_semantic/src/types/builder.rs similarity index 100% rename from crates/red_knot_python_semantic/src/types/builder.rs rename to crates/ty_python_semantic/src/types/builder.rs diff --git a/crates/red_knot_python_semantic/src/types/call.rs b/crates/ty_python_semantic/src/types/call.rs similarity index 100% rename from crates/red_knot_python_semantic/src/types/call.rs rename to crates/ty_python_semantic/src/types/call.rs diff --git a/crates/red_knot_python_semantic/src/types/call/arguments.rs b/crates/ty_python_semantic/src/types/call/arguments.rs similarity index 100% rename from crates/red_knot_python_semantic/src/types/call/arguments.rs rename to crates/ty_python_semantic/src/types/call/arguments.rs diff --git a/crates/red_knot_python_semantic/src/types/call/bind.rs b/crates/ty_python_semantic/src/types/call/bind.rs similarity index 100% rename from crates/red_knot_python_semantic/src/types/call/bind.rs rename to crates/ty_python_semantic/src/types/call/bind.rs diff --git a/crates/red_knot_python_semantic/src/types/class.rs b/crates/ty_python_semantic/src/types/class.rs similarity index 99% rename from crates/red_knot_python_semantic/src/types/class.rs rename to crates/ty_python_semantic/src/types/class.rs index 664fa0706e..315809a086 100644 --- a/crates/red_knot_python_semantic/src/types/class.rs +++ b/crates/ty_python_semantic/src/types/class.rs @@ -1802,7 +1802,7 @@ impl InheritanceCycle { #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] #[cfg_attr(test, derive(strum_macros::EnumIter))] pub enum KnownClass { - // To figure out where an stdlib symbol is defined, you can go into `crates/red_knot_vendored` + // To figure out where an stdlib symbol is defined, you can go into `crates/ty_vendored` // and grep for the symbol name in any `.pyi` file. // Builtins diff --git a/crates/red_knot_python_semantic/src/types/class_base.rs b/crates/ty_python_semantic/src/types/class_base.rs similarity index 100% rename from crates/red_knot_python_semantic/src/types/class_base.rs rename to crates/ty_python_semantic/src/types/class_base.rs diff --git a/crates/red_knot_python_semantic/src/types/context.rs b/crates/ty_python_semantic/src/types/context.rs similarity index 100% rename from crates/red_knot_python_semantic/src/types/context.rs rename to crates/ty_python_semantic/src/types/context.rs diff --git a/crates/red_knot_python_semantic/src/types/definition.rs b/crates/ty_python_semantic/src/types/definition.rs similarity index 100% rename from crates/red_knot_python_semantic/src/types/definition.rs rename to crates/ty_python_semantic/src/types/definition.rs diff --git a/crates/red_knot_python_semantic/src/types/diagnostic.rs b/crates/ty_python_semantic/src/types/diagnostic.rs similarity index 99% rename from crates/red_knot_python_semantic/src/types/diagnostic.rs rename to crates/ty_python_semantic/src/types/diagnostic.rs index 6b0b9fb4ad..3ace0181d0 100644 --- a/crates/red_knot_python_semantic/src/types/diagnostic.rs +++ b/crates/ty_python_semantic/src/types/diagnostic.rs @@ -1052,7 +1052,7 @@ declare_lint! { /// /// ## Examples /// ```python - /// from knot_extensions import static_assert + /// from ty_extensions import static_assert /// /// static_assert(1 + 1 == 3) # error: evaluates to `False` /// diff --git a/crates/red_knot_python_semantic/src/types/display.rs b/crates/ty_python_semantic/src/types/display.rs similarity index 100% rename from crates/red_knot_python_semantic/src/types/display.rs rename to crates/ty_python_semantic/src/types/display.rs diff --git a/crates/red_knot_python_semantic/src/types/generics.rs b/crates/ty_python_semantic/src/types/generics.rs similarity index 100% rename from crates/red_knot_python_semantic/src/types/generics.rs rename to crates/ty_python_semantic/src/types/generics.rs diff --git a/crates/red_knot_python_semantic/src/types/infer.rs b/crates/ty_python_semantic/src/types/infer.rs similarity index 100% rename from crates/red_knot_python_semantic/src/types/infer.rs rename to crates/ty_python_semantic/src/types/infer.rs diff --git a/crates/red_knot_python_semantic/src/types/instance.rs b/crates/ty_python_semantic/src/types/instance.rs similarity index 100% rename from crates/red_knot_python_semantic/src/types/instance.rs rename to crates/ty_python_semantic/src/types/instance.rs diff --git a/crates/red_knot_python_semantic/src/types/known_instance.rs b/crates/ty_python_semantic/src/types/known_instance.rs similarity index 94% rename from crates/red_knot_python_semantic/src/types/known_instance.rs rename to crates/ty_python_semantic/src/types/known_instance.rs index b1cce6d979..5971a42443 100644 --- a/crates/red_knot_python_semantic/src/types/known_instance.rs +++ b/crates/ty_python_semantic/src/types/known_instance.rs @@ -69,19 +69,19 @@ pub enum KnownInstanceType<'db> { TypeVar(TypeVarInstance<'db>), /// A single instance of `typing.TypeAliasType` (PEP 695 type alias) TypeAliasType(TypeAliasType<'db>), - /// The symbol `knot_extensions.Unknown` + /// The symbol `ty_extensions.Unknown` Unknown, - /// The symbol `knot_extensions.AlwaysTruthy` + /// The symbol `ty_extensions.AlwaysTruthy` AlwaysTruthy, - /// The symbol `knot_extensions.AlwaysFalsy` + /// The symbol `ty_extensions.AlwaysFalsy` AlwaysFalsy, - /// The symbol `knot_extensions.Not` + /// The symbol `ty_extensions.Not` Not, - /// The symbol `knot_extensions.Intersection` + /// The symbol `ty_extensions.Intersection` Intersection, - /// The symbol `knot_extensions.TypeOf` + /// The symbol `ty_extensions.TypeOf` TypeOf, - /// The symbol `knot_extensions.CallableTypeOf` + /// The symbol `ty_extensions.CallableTypeOf` CallableTypeOf, /// The symbol `typing.Callable` /// (which can also be found as `typing_extensions.Callable` or as `collections.abc.Callable`) @@ -334,7 +334,7 @@ impl<'db> KnownInstanceType<'db> { | Self::Not | Self::Intersection | Self::TypeOf - | Self::CallableTypeOf => module.is_knot_extensions(), + | Self::CallableTypeOf => module.is_ty_extensions(), } } @@ -396,13 +396,13 @@ impl Display for KnownInstanceRepr<'_> { // have a `Type::TypeVar(_)`, which is rendered as the typevar's name. KnownInstanceType::TypeVar(_) => f.write_str("typing.TypeVar"), KnownInstanceType::TypeAliasType(_) => f.write_str("typing.TypeAliasType"), - KnownInstanceType::Unknown => f.write_str("knot_extensions.Unknown"), - KnownInstanceType::AlwaysTruthy => f.write_str("knot_extensions.AlwaysTruthy"), - KnownInstanceType::AlwaysFalsy => f.write_str("knot_extensions.AlwaysFalsy"), - KnownInstanceType::Not => f.write_str("knot_extensions.Not"), - KnownInstanceType::Intersection => f.write_str("knot_extensions.Intersection"), - KnownInstanceType::TypeOf => f.write_str("knot_extensions.TypeOf"), - KnownInstanceType::CallableTypeOf => f.write_str("knot_extensions.CallableTypeOf"), + KnownInstanceType::Unknown => f.write_str("ty_extensions.Unknown"), + KnownInstanceType::AlwaysTruthy => f.write_str("ty_extensions.AlwaysTruthy"), + KnownInstanceType::AlwaysFalsy => f.write_str("ty_extensions.AlwaysFalsy"), + KnownInstanceType::Not => f.write_str("ty_extensions.Not"), + KnownInstanceType::Intersection => f.write_str("ty_extensions.Intersection"), + KnownInstanceType::TypeOf => f.write_str("ty_extensions.TypeOf"), + KnownInstanceType::CallableTypeOf => f.write_str("ty_extensions.CallableTypeOf"), } } } diff --git a/crates/red_knot_python_semantic/src/types/mro.rs b/crates/ty_python_semantic/src/types/mro.rs similarity index 100% rename from crates/red_knot_python_semantic/src/types/mro.rs rename to crates/ty_python_semantic/src/types/mro.rs diff --git a/crates/red_knot_python_semantic/src/types/narrow.rs b/crates/ty_python_semantic/src/types/narrow.rs similarity index 100% rename from crates/red_knot_python_semantic/src/types/narrow.rs rename to crates/ty_python_semantic/src/types/narrow.rs diff --git a/crates/red_knot_python_semantic/src/types/property_tests.rs b/crates/ty_python_semantic/src/types/property_tests.rs similarity index 97% rename from crates/red_knot_python_semantic/src/types/property_tests.rs rename to crates/ty_python_semantic/src/types/property_tests.rs index 77c83e04e0..e0bca1c509 100644 --- a/crates/red_knot_python_semantic/src/types/property_tests.rs +++ b/crates/ty_python_semantic/src/types/property_tests.rs @@ -4,7 +4,7 @@ //! run them explicitly using: //! //! ```sh -//! cargo test -p red_knot_python_semantic -- --ignored types::property_tests::stable +//! cargo test -p ty_python_semantic -- --ignored types::property_tests::stable //! ``` //! //! The number of tests (default: 100) can be controlled by setting the `QUICKCHECK_TESTS` @@ -20,7 +20,7 @@ //! //! ```sh //! export QUICKCHECK_TESTS=100000 -//! while cargo test --release -p red_knot_python_semantic -- \ +//! while cargo test --release -p ty_python_semantic -- \ //! --ignored types::property_tests::stable; do :; done //! ``` mod setup; @@ -292,7 +292,7 @@ mod flaky { // If `S <: T`, then `~T <: ~S`. // // DO NOT STABILISE this test until the mdtests here pass: - // https://github.com/astral-sh/ruff/blob/2711e08eb8eb38d1ce323aae0517fede371cba15/crates/red_knot_python_semantic/resources/mdtest/type_properties/is_subtype_of.md?plain=1#L276-L315 + // https://github.com/astral-sh/ruff/blob/2711e08eb8eb38d1ce323aae0517fede371cba15/crates/ty_python_semantic/resources/mdtest/type_properties/is_subtype_of.md?plain=1#L276-L315 // // This test has flakes relating to those subtyping and simplification tests // (see https://github.com/astral-sh/ruff/issues/16913), but it is hard to diff --git a/crates/red_knot_python_semantic/src/types/property_tests/setup.rs b/crates/ty_python_semantic/src/types/property_tests/setup.rs similarity index 100% rename from crates/red_knot_python_semantic/src/types/property_tests/setup.rs rename to crates/ty_python_semantic/src/types/property_tests/setup.rs diff --git a/crates/red_knot_python_semantic/src/types/property_tests/type_generation.rs b/crates/ty_python_semantic/src/types/property_tests/type_generation.rs similarity index 100% rename from crates/red_knot_python_semantic/src/types/property_tests/type_generation.rs rename to crates/ty_python_semantic/src/types/property_tests/type_generation.rs diff --git a/crates/red_knot_python_semantic/src/types/protocol_class.rs b/crates/ty_python_semantic/src/types/protocol_class.rs similarity index 100% rename from crates/red_knot_python_semantic/src/types/protocol_class.rs rename to crates/ty_python_semantic/src/types/protocol_class.rs diff --git a/crates/red_knot_python_semantic/src/types/signatures.rs b/crates/ty_python_semantic/src/types/signatures.rs similarity index 100% rename from crates/red_knot_python_semantic/src/types/signatures.rs rename to crates/ty_python_semantic/src/types/signatures.rs diff --git a/crates/red_knot_python_semantic/src/types/slots.rs b/crates/ty_python_semantic/src/types/slots.rs similarity index 100% rename from crates/red_knot_python_semantic/src/types/slots.rs rename to crates/ty_python_semantic/src/types/slots.rs diff --git a/crates/red_knot_python_semantic/src/types/string_annotation.rs b/crates/ty_python_semantic/src/types/string_annotation.rs similarity index 92% rename from crates/red_knot_python_semantic/src/types/string_annotation.rs rename to crates/ty_python_semantic/src/types/string_annotation.rs index 0c76ad6995..ae811bbbb1 100644 --- a/crates/red_knot_python_semantic/src/types/string_annotation.rs +++ b/crates/ty_python_semantic/src/types/string_annotation.rs @@ -13,7 +13,7 @@ declare_lint! { /// Checks for f-strings in type annotation positions. /// /// ## Why is this bad? - /// Static analysis tools like Red Knot can't analyse type annotations that use f-string notation. + /// Static analysis tools like ty can't analyse type annotations that use f-string notation. /// /// ## Examples /// ```python @@ -38,7 +38,7 @@ declare_lint! { /// Checks for byte-strings in type annotation positions. /// /// ## Why is this bad? - /// Static analysis tools like Red Knot can't analyse type annotations that use byte-string notation. + /// Static analysis tools like ty can't analyse type annotations that use byte-string notation. /// /// ## Examples /// ```python @@ -63,7 +63,7 @@ declare_lint! { /// Checks for raw-strings in type annotation positions. /// /// ## Why is this bad? - /// Static analysis tools like Red Knot can't analyse type annotations that use raw-string notation. + /// Static analysis tools like ty can't analyse type annotations that use raw-string notation. /// /// ## Examples /// ```python @@ -88,7 +88,7 @@ declare_lint! { /// Checks for implicit concatenated strings in type annotation positions. /// /// ## Why is this bad? - /// Static analysis tools like Red Knot can't analyse type annotations that use implicit concatenated strings. + /// Static analysis tools like ty can't analyse type annotations that use implicit concatenated strings. /// /// ## Examples /// ```python diff --git a/crates/red_knot_python_semantic/src/types/subclass_of.rs b/crates/ty_python_semantic/src/types/subclass_of.rs similarity index 100% rename from crates/red_knot_python_semantic/src/types/subclass_of.rs rename to crates/ty_python_semantic/src/types/subclass_of.rs diff --git a/crates/red_knot_python_semantic/src/types/type_ordering.rs b/crates/ty_python_semantic/src/types/type_ordering.rs similarity index 100% rename from crates/red_knot_python_semantic/src/types/type_ordering.rs rename to crates/ty_python_semantic/src/types/type_ordering.rs diff --git a/crates/red_knot_python_semantic/src/types/unpacker.rs b/crates/ty_python_semantic/src/types/unpacker.rs similarity index 100% rename from crates/red_knot_python_semantic/src/types/unpacker.rs rename to crates/ty_python_semantic/src/types/unpacker.rs diff --git a/crates/red_knot_python_semantic/src/unpack.rs b/crates/ty_python_semantic/src/unpack.rs similarity index 100% rename from crates/red_knot_python_semantic/src/unpack.rs rename to crates/ty_python_semantic/src/unpack.rs diff --git a/crates/red_knot_python_semantic/src/util/mod.rs b/crates/ty_python_semantic/src/util/mod.rs similarity index 100% rename from crates/red_knot_python_semantic/src/util/mod.rs rename to crates/ty_python_semantic/src/util/mod.rs diff --git a/crates/red_knot_python_semantic/src/util/subscript.rs b/crates/ty_python_semantic/src/util/subscript.rs similarity index 100% rename from crates/red_knot_python_semantic/src/util/subscript.rs rename to crates/ty_python_semantic/src/util/subscript.rs diff --git a/crates/red_knot_python_semantic/tests/mdtest.rs b/crates/ty_python_semantic/tests/mdtest.rs similarity index 94% rename from crates/red_knot_python_semantic/tests/mdtest.rs rename to crates/ty_python_semantic/tests/mdtest.rs index b2ea0f141c..0c651167af 100644 --- a/crates/red_knot_python_semantic/tests/mdtest.rs +++ b/crates/ty_python_semantic/tests/mdtest.rs @@ -1,8 +1,8 @@ use camino::Utf8Path; use dir_test::{dir_test, Fixture}; -use red_knot_test::OutputFormat; +use ty_test::OutputFormat; -/// See `crates/red_knot_test/README.md` for documentation on these tests. +/// See `crates/ty_test/README.md` for documentation on these tests. #[dir_test( dir: "$CARGO_MANIFEST_DIR/resources/mdtest", glob: "**/*.md" @@ -25,7 +25,7 @@ fn mdtest(fixture: Fixture<&str>) { OutputFormat::Cli }; - red_knot_test::run( + ty_test::run( absolute_fixture_path, relative_fixture_path, &snapshot_path, diff --git a/crates/red_knot_server/Cargo.toml b/crates/ty_server/Cargo.toml similarity index 86% rename from crates/red_knot_server/Cargo.toml rename to crates/ty_server/Cargo.toml index c5c17c1561..0bae064fda 100644 --- a/crates/red_knot_server/Cargo.toml +++ b/crates/ty_server/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "red_knot_server" +name = "ty_server" version = "0.0.0" publish = false authors = { workspace = true } @@ -11,15 +11,15 @@ repository = { workspace = true } license = { workspace = true } [dependencies] -red_knot_ide = { workspace = true } -red_knot_project = { workspace = true } -red_knot_python_semantic = { workspace = true } - ruff_db = { workspace = true, features = ["os"] } ruff_notebook = { workspace = true } ruff_source_file = { workspace = true } ruff_text_size = { workspace = true } +ty_ide = { workspace = true } +ty_project = { workspace = true } +ty_python_semantic = { workspace = true } + anyhow = { workspace = true } crossbeam = { workspace = true } jod-thread = { workspace = true } diff --git a/crates/red_knot_server/src/document.rs b/crates/ty_server/src/document.rs similarity index 100% rename from crates/red_knot_server/src/document.rs rename to crates/ty_server/src/document.rs diff --git a/crates/red_knot_server/src/document/location.rs b/crates/ty_server/src/document/location.rs similarity index 88% rename from crates/red_knot_server/src/document/location.rs rename to crates/ty_server/src/document/location.rs index c2e73fcb24..441a33f0bd 100644 --- a/crates/red_knot_server/src/document/location.rs +++ b/crates/ty_server/src/document/location.rs @@ -2,21 +2,17 @@ use crate::document::{FileRangeExt, ToRangeExt}; use crate::system::file_to_url; use crate::PositionEncoding; use lsp_types::Location; -use red_knot_ide::{Db, NavigationTarget}; use ruff_db::files::FileRange; use ruff_db::source::{line_index, source_text}; use ruff_text_size::Ranged; +use ty_ide::{Db, NavigationTarget}; pub(crate) trait ToLink { - fn to_location( - &self, - db: &dyn red_knot_ide::Db, - encoding: PositionEncoding, - ) -> Option; + fn to_location(&self, db: &dyn ty_ide::Db, encoding: PositionEncoding) -> Option; fn to_link( &self, - db: &dyn red_knot_ide::Db, + db: &dyn ty_ide::Db, src: Option, encoding: PositionEncoding, ) -> Option; diff --git a/crates/red_knot_server/src/document/notebook.rs b/crates/ty_server/src/document/notebook.rs similarity index 100% rename from crates/red_knot_server/src/document/notebook.rs rename to crates/ty_server/src/document/notebook.rs diff --git a/crates/red_knot_server/src/document/range.rs b/crates/ty_server/src/document/range.rs similarity index 99% rename from crates/red_knot_server/src/document/range.rs rename to crates/ty_server/src/document/range.rs index 492f2f86ee..4a9e49ef31 100644 --- a/crates/red_knot_server/src/document/range.rs +++ b/crates/ty_server/src/document/range.rs @@ -5,13 +5,13 @@ use crate::system::file_to_url; use lsp_types as types; use lsp_types::Location; -use red_knot_python_semantic::Db; use ruff_db::files::FileRange; use ruff_db::source::{line_index, source_text}; use ruff_notebook::NotebookIndex; use ruff_source_file::LineIndex; use ruff_source_file::{OneIndexed, SourceLocation}; use ruff_text_size::{Ranged, TextRange, TextSize}; +use ty_python_semantic::Db; #[expect(dead_code)] pub(crate) struct NotebookRange { diff --git a/crates/red_knot_server/src/document/text_document.rs b/crates/ty_server/src/document/text_document.rs similarity index 100% rename from crates/red_knot_server/src/document/text_document.rs rename to crates/ty_server/src/document/text_document.rs diff --git a/crates/red_knot_server/src/lib.rs b/crates/ty_server/src/lib.rs similarity index 90% rename from crates/red_knot_server/src/lib.rs rename to crates/ty_server/src/lib.rs index ccd35d7025..efc27184c7 100644 --- a/crates/red_knot_server/src/lib.rs +++ b/crates/ty_server/src/lib.rs @@ -13,8 +13,8 @@ mod server; mod session; mod system; -pub(crate) const SERVER_NAME: &str = "red-knot"; -pub(crate) const DIAGNOSTIC_NAME: &str = "Red Knot"; +pub(crate) const SERVER_NAME: &str = "ty"; +pub(crate) const DIAGNOSTIC_NAME: &str = "ty"; /// A common result type used in most cases where a /// result type is needed. diff --git a/crates/red_knot_server/src/logging.rs b/crates/ty_server/src/logging.rs similarity index 96% rename from crates/red_knot_server/src/logging.rs rename to crates/ty_server/src/logging.rs index bde8c57d09..a322ef2499 100644 --- a/crates/red_knot_server/src/logging.rs +++ b/crates/ty_server/src/logging.rs @@ -1,4 +1,4 @@ -//! The logging system for `red_knot server`. +//! The logging system for `ty server`. //! //! Log messages are controlled by the `logLevel` setting which defaults to `"info"`. Log messages //! are written to `stderr` by default, which should appear in the logs for most LSP clients. A @@ -99,7 +99,7 @@ impl tracing_subscriber::layer::Filter for LogLevelFilter { meta: &tracing::Metadata<'_>, _: &tracing_subscriber::layer::Context<'_, S>, ) -> bool { - let filter = if meta.target().starts_with("red_knot") { + let filter = if meta.target().starts_with("ty") { self.filter.trace_level() } else { tracing::Level::WARN diff --git a/crates/red_knot_server/src/message.rs b/crates/ty_server/src/message.rs similarity index 100% rename from crates/red_knot_server/src/message.rs rename to crates/ty_server/src/message.rs diff --git a/crates/red_knot_server/src/server.rs b/crates/ty_server/src/server.rs similarity index 100% rename from crates/red_knot_server/src/server.rs rename to crates/ty_server/src/server.rs diff --git a/crates/red_knot_server/src/server/api.rs b/crates/ty_server/src/server/api.rs similarity index 100% rename from crates/red_knot_server/src/server/api.rs rename to crates/ty_server/src/server/api.rs diff --git a/crates/red_knot_server/src/server/api/diagnostics.rs b/crates/ty_server/src/server/api/diagnostics.rs similarity index 100% rename from crates/red_knot_server/src/server/api/diagnostics.rs rename to crates/ty_server/src/server/api/diagnostics.rs diff --git a/crates/red_knot_server/src/server/api/notifications.rs b/crates/ty_server/src/server/api/notifications.rs similarity index 100% rename from crates/red_knot_server/src/server/api/notifications.rs rename to crates/ty_server/src/server/api/notifications.rs diff --git a/crates/red_knot_server/src/server/api/notifications/did_change.rs b/crates/ty_server/src/server/api/notifications/did_change.rs similarity index 97% rename from crates/red_knot_server/src/server/api/notifications/did_change.rs rename to crates/ty_server/src/server/api/notifications/did_change.rs index 93e23f01e1..c230f7be0e 100644 --- a/crates/red_knot_server/src/server/api/notifications/did_change.rs +++ b/crates/ty_server/src/server/api/notifications/did_change.rs @@ -2,7 +2,7 @@ use lsp_server::ErrorCode; use lsp_types::notification::DidChangeTextDocument; use lsp_types::DidChangeTextDocumentParams; -use red_knot_project::watch::ChangeEvent; +use ty_project::watch::ChangeEvent; use crate::server::api::traits::{NotificationHandler, SyncNotificationHandler}; use crate::server::api::LSPResult; diff --git a/crates/red_knot_server/src/server/api/notifications/did_close.rs b/crates/ty_server/src/server/api/notifications/did_close.rs similarity index 97% rename from crates/red_knot_server/src/server/api/notifications/did_close.rs rename to crates/ty_server/src/server/api/notifications/did_close.rs index 9aea65ccd4..a63348d1c5 100644 --- a/crates/red_knot_server/src/server/api/notifications/did_close.rs +++ b/crates/ty_server/src/server/api/notifications/did_close.rs @@ -1,7 +1,7 @@ use lsp_server::ErrorCode; use lsp_types::notification::DidCloseTextDocument; use lsp_types::DidCloseTextDocumentParams; -use red_knot_project::watch::ChangeEvent; +use ty_project::watch::ChangeEvent; use crate::server::api::diagnostics::clear_diagnostics; use crate::server::api::traits::{NotificationHandler, SyncNotificationHandler}; diff --git a/crates/red_knot_server/src/server/api/notifications/did_close_notebook.rs b/crates/ty_server/src/server/api/notifications/did_close_notebook.rs similarity index 96% rename from crates/red_knot_server/src/server/api/notifications/did_close_notebook.rs rename to crates/ty_server/src/server/api/notifications/did_close_notebook.rs index 240d7beebb..741f436f0a 100644 --- a/crates/red_knot_server/src/server/api/notifications/did_close_notebook.rs +++ b/crates/ty_server/src/server/api/notifications/did_close_notebook.rs @@ -1,7 +1,7 @@ use lsp_types::notification::DidCloseNotebookDocument; use lsp_types::DidCloseNotebookDocumentParams; -use red_knot_project::watch::ChangeEvent; +use ty_project::watch::ChangeEvent; use crate::server::api::traits::{NotificationHandler, SyncNotificationHandler}; use crate::server::api::LSPResult; diff --git a/crates/red_knot_server/src/server/api/notifications/did_open.rs b/crates/ty_server/src/server/api/notifications/did_open.rs similarity index 97% rename from crates/red_knot_server/src/server/api/notifications/did_open.rs rename to crates/ty_server/src/server/api/notifications/did_open.rs index 2530640bf6..3bd1698f10 100644 --- a/crates/red_knot_server/src/server/api/notifications/did_open.rs +++ b/crates/ty_server/src/server/api/notifications/did_open.rs @@ -1,8 +1,8 @@ use lsp_types::notification::DidOpenTextDocument; use lsp_types::{DidOpenTextDocumentParams, TextDocumentItem}; -use red_knot_project::watch::ChangeEvent; use ruff_db::Db; +use ty_project::watch::ChangeEvent; use crate::server::api::traits::{NotificationHandler, SyncNotificationHandler}; use crate::server::client::{Notifier, Requester}; diff --git a/crates/red_knot_server/src/server/api/notifications/did_open_notebook.rs b/crates/ty_server/src/server/api/notifications/did_open_notebook.rs similarity index 97% rename from crates/red_knot_server/src/server/api/notifications/did_open_notebook.rs rename to crates/ty_server/src/server/api/notifications/did_open_notebook.rs index ea355e7e0f..5bf3c4ca3e 100644 --- a/crates/red_knot_server/src/server/api/notifications/did_open_notebook.rs +++ b/crates/ty_server/src/server/api/notifications/did_open_notebook.rs @@ -2,8 +2,8 @@ use lsp_server::ErrorCode; use lsp_types::notification::DidOpenNotebookDocument; use lsp_types::DidOpenNotebookDocumentParams; -use red_knot_project::watch::ChangeEvent; use ruff_db::Db; +use ty_project::watch::ChangeEvent; use crate::document::NotebookDocument; use crate::server::api::traits::{NotificationHandler, SyncNotificationHandler}; diff --git a/crates/red_knot_server/src/server/api/requests.rs b/crates/ty_server/src/server/api/requests.rs similarity index 100% rename from crates/red_knot_server/src/server/api/requests.rs rename to crates/ty_server/src/server/api/requests.rs diff --git a/crates/red_knot_server/src/server/api/requests/completion.rs b/crates/ty_server/src/server/api/requests/completion.rs similarity index 96% rename from crates/red_knot_server/src/server/api/requests/completion.rs rename to crates/ty_server/src/server/api/requests/completion.rs index 93a1c9d8cc..6ca7057113 100644 --- a/crates/red_knot_server/src/server/api/requests/completion.rs +++ b/crates/ty_server/src/server/api/requests/completion.rs @@ -2,9 +2,9 @@ use std::borrow::Cow; use lsp_types::request::Completion; use lsp_types::{CompletionItem, CompletionParams, CompletionResponse, Url}; -use red_knot_ide::completion; -use red_knot_project::ProjectDatabase; use ruff_db::source::{line_index, source_text}; +use ty_ide::completion; +use ty_project::ProjectDatabase; use crate::document::PositionExt; use crate::server::api::traits::{BackgroundDocumentRequestHandler, RequestHandler}; diff --git a/crates/red_knot_server/src/server/api/requests/diagnostic.rs b/crates/ty_server/src/server/api/requests/diagnostic.rs similarity index 97% rename from crates/red_knot_server/src/server/api/requests/diagnostic.rs rename to crates/ty_server/src/server/api/requests/diagnostic.rs index 8b3d03d34b..e128e22a44 100644 --- a/crates/red_knot_server/src/server/api/requests/diagnostic.rs +++ b/crates/ty_server/src/server/api/requests/diagnostic.rs @@ -11,9 +11,9 @@ use crate::document::ToRangeExt; use crate::server::api::traits::{BackgroundDocumentRequestHandler, RequestHandler}; use crate::server::{client::Notifier, Result}; use crate::session::DocumentSnapshot; -use red_knot_project::{Db, ProjectDatabase}; use ruff_db::diagnostic::Severity; use ruff_db::source::{line_index, source_text}; +use ty_project::{Db, ProjectDatabase}; pub(crate) struct DocumentDiagnosticRequestHandler; @@ -98,7 +98,7 @@ fn to_lsp_diagnostic( tags: None, code: Some(NumberOrString::String(diagnostic.id().to_string())), code_description: None, - source: Some("red-knot".into()), + source: Some("ty".into()), message: diagnostic.concise_message().to_string(), related_information: None, data: None, diff --git a/crates/red_knot_server/src/server/api/requests/goto_type_definition.rs b/crates/ty_server/src/server/api/requests/goto_type_definition.rs similarity index 96% rename from crates/red_knot_server/src/server/api/requests/goto_type_definition.rs rename to crates/ty_server/src/server/api/requests/goto_type_definition.rs index bb3a4e6e58..8ced577d19 100644 --- a/crates/red_knot_server/src/server/api/requests/goto_type_definition.rs +++ b/crates/ty_server/src/server/api/requests/goto_type_definition.rs @@ -2,9 +2,9 @@ use std::borrow::Cow; use lsp_types::request::{GotoTypeDefinition, GotoTypeDefinitionParams}; use lsp_types::{GotoDefinitionResponse, Url}; -use red_knot_ide::goto_type_definition; -use red_knot_project::ProjectDatabase; use ruff_db::source::{line_index, source_text}; +use ty_ide::goto_type_definition; +use ty_project::ProjectDatabase; use crate::document::{PositionExt, ToLink}; use crate::server::api::traits::{BackgroundDocumentRequestHandler, RequestHandler}; diff --git a/crates/red_knot_server/src/server/api/requests/hover.rs b/crates/ty_server/src/server/api/requests/hover.rs similarity index 96% rename from crates/red_knot_server/src/server/api/requests/hover.rs rename to crates/ty_server/src/server/api/requests/hover.rs index 2677f67c32..c9b45ee84f 100644 --- a/crates/red_knot_server/src/server/api/requests/hover.rs +++ b/crates/ty_server/src/server/api/requests/hover.rs @@ -6,10 +6,10 @@ use crate::server::client::Notifier; use crate::DocumentSnapshot; use lsp_types::request::HoverRequest; use lsp_types::{HoverContents, HoverParams, MarkupContent, Url}; -use red_knot_ide::{hover, MarkupKind}; -use red_knot_project::ProjectDatabase; use ruff_db::source::{line_index, source_text}; use ruff_text_size::Ranged; +use ty_ide::{hover, MarkupKind}; +use ty_project::ProjectDatabase; pub(crate) struct HoverRequestHandler; diff --git a/crates/red_knot_server/src/server/api/requests/inlay_hints.rs b/crates/ty_server/src/server/api/requests/inlay_hints.rs similarity index 96% rename from crates/red_knot_server/src/server/api/requests/inlay_hints.rs rename to crates/ty_server/src/server/api/requests/inlay_hints.rs index f299fdf975..1bc1b330d5 100644 --- a/crates/red_knot_server/src/server/api/requests/inlay_hints.rs +++ b/crates/ty_server/src/server/api/requests/inlay_hints.rs @@ -6,9 +6,9 @@ use crate::server::client::Notifier; use crate::DocumentSnapshot; use lsp_types::request::InlayHintRequest; use lsp_types::{InlayHintParams, Url}; -use red_knot_ide::inlay_hints; -use red_knot_project::ProjectDatabase; use ruff_db::source::{line_index, source_text}; +use ty_ide::inlay_hints; +use ty_project::ProjectDatabase; pub(crate) struct InlayHintRequestHandler; diff --git a/crates/red_knot_server/src/server/api/traits.rs b/crates/ty_server/src/server/api/traits.rs similarity index 98% rename from crates/red_knot_server/src/server/api/traits.rs rename to crates/ty_server/src/server/api/traits.rs index e5c9a60907..89db4c3833 100644 --- a/crates/red_knot_server/src/server/api/traits.rs +++ b/crates/ty_server/src/server/api/traits.rs @@ -5,7 +5,7 @@ use crate::session::{DocumentSnapshot, Session}; use lsp_types::notification::Notification as LSPNotification; use lsp_types::request::Request; -use red_knot_project::ProjectDatabase; +use ty_project::ProjectDatabase; /// A supertrait for any server request handler. pub(super) trait RequestHandler { diff --git a/crates/red_knot_server/src/server/client.rs b/crates/ty_server/src/server/client.rs similarity index 100% rename from crates/red_knot_server/src/server/client.rs rename to crates/ty_server/src/server/client.rs diff --git a/crates/red_knot_server/src/server/connection.rs b/crates/ty_server/src/server/connection.rs similarity index 100% rename from crates/red_knot_server/src/server/connection.rs rename to crates/ty_server/src/server/connection.rs diff --git a/crates/red_knot_server/src/server/schedule.rs b/crates/ty_server/src/server/schedule.rs similarity index 100% rename from crates/red_knot_server/src/server/schedule.rs rename to crates/ty_server/src/server/schedule.rs diff --git a/crates/red_knot_server/src/server/schedule/task.rs b/crates/ty_server/src/server/schedule/task.rs similarity index 100% rename from crates/red_knot_server/src/server/schedule/task.rs rename to crates/ty_server/src/server/schedule/task.rs diff --git a/crates/red_knot_server/src/server/schedule/thread.rs b/crates/ty_server/src/server/schedule/thread.rs similarity index 100% rename from crates/red_knot_server/src/server/schedule/thread.rs rename to crates/ty_server/src/server/schedule/thread.rs diff --git a/crates/red_knot_server/src/server/schedule/thread/pool.rs b/crates/ty_server/src/server/schedule/thread/pool.rs similarity index 100% rename from crates/red_knot_server/src/server/schedule/thread/pool.rs rename to crates/ty_server/src/server/schedule/thread/pool.rs diff --git a/crates/red_knot_server/src/server/schedule/thread/priority.rs b/crates/ty_server/src/server/schedule/thread/priority.rs similarity index 100% rename from crates/red_knot_server/src/server/schedule/thread/priority.rs rename to crates/ty_server/src/server/schedule/thread/priority.rs diff --git a/crates/red_knot_server/src/session.rs b/crates/ty_server/src/session.rs similarity index 98% rename from crates/red_knot_server/src/session.rs rename to crates/ty_server/src/session.rs index 470592e8bd..a429b492e5 100644 --- a/crates/red_knot_server/src/session.rs +++ b/crates/ty_server/src/session.rs @@ -8,10 +8,10 @@ use std::sync::Arc; use anyhow::anyhow; use lsp_types::{ClientCapabilities, TextDocumentContentChangeEvent, Url}; -use red_knot_project::{ProjectDatabase, ProjectMetadata}; use ruff_db::files::{system_path_to_file, File}; use ruff_db::system::SystemPath; use ruff_db::Db; +use ty_project::{ProjectDatabase, ProjectMetadata}; use crate::document::{DocumentKey, DocumentVersion, NotebookDocument}; use crate::system::{url_to_any_system_path, AnySystemPath, LSPSystem}; @@ -113,13 +113,13 @@ impl Session { /// Returns a reference to the default project [`ProjectDatabase`]. The default project is the /// minimum root path in the project map. pub(crate) fn default_project_db(&self) -> &ProjectDatabase { - // SAFETY: Currently, red knot only support a single project. + // SAFETY: Currently, ty only support a single project. self.projects_by_workspace_folder.values().next().unwrap() } /// Returns a mutable reference to the default project [`ProjectDatabase`]. pub(crate) fn default_project_db_mut(&mut self) -> &mut ProjectDatabase { - // SAFETY: Currently, red knot only support a single project. + // SAFETY: Currently, ty only support a single project. self.projects_by_workspace_folder .values_mut() .next() diff --git a/crates/red_knot_server/src/session/capabilities.rs b/crates/ty_server/src/session/capabilities.rs similarity index 100% rename from crates/red_knot_server/src/session/capabilities.rs rename to crates/ty_server/src/session/capabilities.rs diff --git a/crates/red_knot_server/src/session/index.rs b/crates/ty_server/src/session/index.rs similarity index 100% rename from crates/red_knot_server/src/session/index.rs rename to crates/ty_server/src/session/index.rs diff --git a/crates/red_knot_server/src/session/settings.rs b/crates/ty_server/src/session/settings.rs similarity index 100% rename from crates/red_knot_server/src/session/settings.rs rename to crates/ty_server/src/session/settings.rs diff --git a/crates/red_knot_server/src/system.rs b/crates/ty_server/src/system.rs similarity index 99% rename from crates/red_knot_server/src/system.rs rename to crates/ty_server/src/system.rs index 12d4057a72..918e5c81bc 100644 --- a/crates/red_knot_server/src/system.rs +++ b/crates/ty_server/src/system.rs @@ -3,7 +3,6 @@ use std::fmt::Display; use std::sync::Arc; use lsp_types::Url; -use red_knot_python_semantic::Db; use ruff_db::file_revision::FileRevision; use ruff_db::files::{File, FilePath}; use ruff_db::system::walk_directory::WalkDirectoryBuilder; @@ -12,6 +11,7 @@ use ruff_db::system::{ System, SystemPath, SystemPathBuf, SystemVirtualPath, SystemVirtualPathBuf, }; use ruff_notebook::{Notebook, NotebookError}; +use ty_python_semantic::Db; use crate::session::index::Index; use crate::DocumentQuery; diff --git a/crates/red_knot_test/Cargo.toml b/crates/ty_test/Cargo.toml similarity index 88% rename from crates/red_knot_test/Cargo.toml rename to crates/ty_test/Cargo.toml index 73aeb8daa4..06b83c5ad4 100644 --- a/crates/red_knot_test/Cargo.toml +++ b/crates/ty_test/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "red_knot_test" +name = "ty_test" version = "0.0.0" publish = false edition.workspace = true @@ -11,8 +11,6 @@ authors.workspace = true license.workspace = true [dependencies] -red_knot_python_semantic = { workspace = true, features = ["serde"] } -red_knot_vendored = { workspace = true } ruff_db = { workspace = true, features = ["os", "testing"] } ruff_index = { workspace = true } ruff_notebook = { workspace = true } @@ -20,6 +18,8 @@ ruff_python_trivia = { workspace = true } ruff_source_file = { workspace = true } ruff_text_size = { workspace = true } ruff_python_ast = { workspace = true } +ty_python_semantic = { workspace = true, features = ["serde"] } +ty_vendored = { workspace = true } anyhow = { workspace = true } camino = { workspace = true } diff --git a/crates/red_knot_test/README.md b/crates/ty_test/README.md similarity index 93% rename from crates/red_knot_test/README.md rename to crates/ty_test/README.md index 893c4d3b36..6930a09528 100644 --- a/crates/red_knot_test/README.md +++ b/crates/ty_test/README.md @@ -2,8 +2,8 @@ Any Markdown file can be a test suite. -In order for it to be run as one, `red_knot_test::run` must be called with its path; see -`crates/red_knot_python_semantic/tests/mdtest.rs` for an example that treats all Markdown files +In order for it to be run as one, `ty_test::run` must be called with its path; see +`crates/ty_python_semantic/tests/mdtest.rs` for an example that treats all Markdown files under a certain directory as test suites. A Markdown test suite can contain any number of tests. A test consists of one or more embedded @@ -32,14 +32,14 @@ syntax, it's just how this README embeds an example mdtest Markdown document.) ---> See actual example mdtest suites in -[`crates/red_knot_python_semantic/resources/mdtest`](https://github.com/astral-sh/ruff/tree/main/crates/red_knot_python_semantic/resources/mdtest). +[`crates/ty_python_semantic/resources/mdtest`](https://github.com/astral-sh/ruff/tree/main/crates/ty_python_semantic/resources/mdtest). > [!NOTE] > If you use `dir-test`, `rstest` or similar to generate a separate test for all Markdown files in a certain directory, -> as with the example in `crates/red_knot_python_semantic/tests/mdtest.rs`, +> as with the example in `crates/ty_python_semantic/tests/mdtest.rs`, > you will likely want to also make sure that the crate the tests are in is rebuilt every time a > Markdown file is added or removed from the directory. See -> [`crates/red_knot_python_semantic/build.rs`](https://github.com/astral-sh/ruff/tree/main/crates/red_knot_python_semantic/build.rs) +> [`crates/ty_python_semantic/build.rs`](https://github.com/astral-sh/ruff/tree/main/crates/ty_python_semantic/build.rs) > for an example of how to do this. > > This is because these macros generate their tests at build time rather than at runtime. @@ -237,7 +237,7 @@ This test suite contains two tests, one named "Same-file invalid assignment" and "Cross-file invalid assignment". The first test involves only a single embedded file, and the second test involves two embedded files. -The tests are run independently, in independent in-memory file systems and with new red-knot +The tests are run independently, in independent in-memory file systems and with new ty [Salsa](https://github.com/salsa-rs/salsa) databases. This means that each is a from-scratch run of the type checker, with no data persisting from any previous test. @@ -284,7 +284,7 @@ deeply-nested headers (headers with more `#`), but it cannot contain both. ## Configuration -The test framework supports a TOML-based configuration format, which is a subset of the full red-knot +The test framework supports a TOML-based configuration format, which is a subset of the full ty configuration format. This configuration can be specified in fenced code blocks with `toml` as the language tag: @@ -298,7 +298,7 @@ python-version = "3.10" This configuration will apply to all tests in the same section, and all nested sections within that section. Nested sections can override configurations from their parent sections. -See [`MarkdownTestConfig`](https://github.com/astral-sh/ruff/blob/main/crates/red_knot_test/src/config.rs) for the full list of supported configuration options. +See [`MarkdownTestConfig`](https://github.com/astral-sh/ruff/blob/main/crates/ty_test/src/config.rs) for the full list of supported configuration options. ### Specifying a custom typeshed @@ -326,7 +326,7 @@ python = ".venv" ``` ```` -Red-knot will reject virtual environments that do not have valid `pyvenv.cfg` files at the +ty will reject virtual environments that do not have valid `pyvenv.cfg` files at the virtual-environment directory root (here, `.venv/pyvenv.cfg`). However, if a `pyvenv.cfg` file does not have its contents specified by the test, mdtest will automatically generate one for you, to make mocking a virtual environment more ergonomic. @@ -373,13 +373,13 @@ All Markdown-based tests are executed in a normal `cargo test` / `cargo run next *only*, you can filter the tests using `mdtest__`: ```bash -cargo test -p red_knot_python_semantic -- mdtest__ +cargo test -p ty_python_semantic -- mdtest__ ``` Alternatively, you can use the `mdtest.py` runner which has a watch mode that will re-run corresponding tests when Markdown files change, and recompile automatically when Rust code changes: ```bash -uv run crates/red_knot_python_semantic/mdtest.py +uv run crates/ty_python_semantic/mdtest.py ``` ## Planned features @@ -406,10 +406,10 @@ an assertion ended by `>>>>`, etc. ### Configuring search paths and kinds -The red-knot TOML configuration format hasn't been finalized, and we may want to implement +The ty TOML configuration format hasn't been finalized, and we may want to implement support in the test framework for configuring search paths before it is designed. If so, we can define some configuration options for now under the `[tests]` namespace. In the future, perhaps -some of these can be replaced by real red-knot configuration options; some or all may also be +some of these can be replaced by real ty configuration options; some or all may also be kept long-term as test-specific options. Some configuration options we will want to provide: @@ -454,7 +454,7 @@ x = 1 reveal_type(x) ``` -This is just an example, not a proposal that red-knot would ever actually output diagnostics in +This is just an example, not a proposal that ty would ever actually output diagnostics in precisely this format: ```output @@ -538,5 +538,5 @@ cold, to validate equivalence of cold and incremental check results. [^extensions]: `typing-extensions` is a third-party module, but typeshed, and thus type checkers also, treat it as part of the standard library. -[custom-typeshed markdown test]: ../red_knot_python_semantic/resources/mdtest/mdtest_custom_typeshed.md +[custom-typeshed markdown test]: ../ty_python_semantic/resources/mdtest/mdtest_custom_typeshed.md [typeshed `versions`]: https://github.com/python/typeshed/blob/c546278aae47de0b2b664973da4edb613400f6ce/stdlib/VERSIONS#L1-L18%3E diff --git a/crates/red_knot_test/src/assertion.rs b/crates/ty_test/src/assertion.rs similarity index 99% rename from crates/red_knot_test/src/assertion.rs rename to crates/ty_test/src/assertion.rs index 8f31b5de66..529f39eee1 100644 --- a/crates/red_knot_test/src/assertion.rs +++ b/crates/ty_test/src/assertion.rs @@ -489,12 +489,12 @@ pub(crate) enum ErrorAssertionParseError<'a> { #[cfg(test)] mod tests { use super::*; - use red_knot_python_semantic::{Program, ProgramSettings, PythonPlatform, SearchPathSettings}; use ruff_db::files::system_path_to_file; use ruff_db::system::DbWithWritableSystem as _; use ruff_python_ast::PythonVersion; use ruff_python_trivia::textwrap::dedent; use ruff_source_file::OneIndexed; + use ty_python_semantic::{Program, ProgramSettings, PythonPlatform, SearchPathSettings}; fn get_assertions(source: &str) -> InlineFileAssertions { let mut db = Db::setup(); diff --git a/crates/red_knot_test/src/config.rs b/crates/ty_test/src/config.rs similarity index 89% rename from crates/red_knot_test/src/config.rs rename to crates/ty_test/src/config.rs index 8f2c4c3caa..ba27900719 100644 --- a/crates/red_knot_test/src/config.rs +++ b/crates/ty_test/src/config.rs @@ -1,18 +1,18 @@ -//! TOML-deserializable Red Knot configuration, similar to `knot.toml`, to be able to +//! TOML-deserializable ty configuration, similar to `ty.toml`, to be able to //! control some configuration options from Markdown files. For now, this supports the //! following limited structure: //! //! ```toml -//! log = true # or log = "red_knot=WARN" +//! log = true # or log = "ty=WARN" //! [environment] //! python-version = "3.10" //! ``` use anyhow::Context; -use red_knot_python_semantic::PythonPlatform; use ruff_db::system::{SystemPath, SystemPathBuf}; use ruff_python_ast::PythonVersion; use serde::{Deserialize, Serialize}; +use ty_python_semantic::PythonPlatform; #[derive(Deserialize, Debug, Default, Clone)] #[serde(rename_all = "kebab-case", deny_unknown_fields)] @@ -68,9 +68,9 @@ pub(crate) struct Environment { /// Additional search paths to consider when resolving modules. pub(crate) extra_paths: Option>, - /// Path to the Python installation from which Red Knot resolves type information and third-party dependencies. + /// Path to the Python installation from which ty resolves type information and third-party dependencies. /// - /// Red Knot will search in the path's `site-packages` directories for type information and + /// ty will search in the path's `site-packages` directories for type information and /// third-party imports. /// /// This option is commonly used to specify the path to a virtual environment. diff --git a/crates/red_knot_test/src/db.rs b/crates/ty_test/src/db.rs similarity index 97% rename from crates/red_knot_test/src/db.rs rename to crates/ty_test/src/db.rs index c26206e66a..3c43bc96fa 100644 --- a/crates/red_knot_test/src/db.rs +++ b/crates/ty_test/src/db.rs @@ -1,6 +1,4 @@ use camino::{Utf8Component, Utf8PathBuf}; -use red_knot_python_semantic::lint::{LintRegistry, RuleSelection}; -use red_knot_python_semantic::{default_lint_registry, Db as SemanticDb, Program}; use ruff_db::files::{File, Files}; use ruff_db::system::{ CaseSensitivity, DbWithWritableSystem, InMemorySystem, OsSystem, System, SystemPath, @@ -12,6 +10,8 @@ use ruff_notebook::{Notebook, NotebookError}; use std::borrow::Cow; use std::sync::Arc; use tempfile::TempDir; +use ty_python_semantic::lint::{LintRegistry, RuleSelection}; +use ty_python_semantic::{default_lint_registry, Db as SemanticDb, Program}; #[salsa::db] #[derive(Clone)] @@ -30,7 +30,7 @@ impl Db { Self { system: MdtestSystem::in_memory(), storage: salsa::Storage::default(), - vendored: red_knot_vendored::file_system().clone(), + vendored: ty_vendored::file_system().clone(), files: Files::default(), rule_selection: Arc::new(rule_selection), } diff --git a/crates/red_knot_test/src/diagnostic.rs b/crates/ty_test/src/diagnostic.rs similarity index 100% rename from crates/red_knot_test/src/diagnostic.rs rename to crates/ty_test/src/diagnostic.rs diff --git a/crates/red_knot_test/src/lib.rs b/crates/ty_test/src/lib.rs similarity index 99% rename from crates/red_knot_test/src/lib.rs rename to crates/ty_test/src/lib.rs index 4ae5dca033..b6dab4fb02 100644 --- a/crates/red_knot_test/src/lib.rs +++ b/crates/ty_test/src/lib.rs @@ -4,10 +4,6 @@ use camino::Utf8Path; use colored::Colorize; use config::SystemKind; use parser as test_parser; -use red_knot_python_semantic::types::check_types; -use red_knot_python_semantic::{ - Program, ProgramSettings, PythonPath, PythonPlatform, SearchPathSettings, SysPrefixPathOrigin, -}; use ruff_db::diagnostic::{ create_parse_diagnostic, create_unsupported_syntax_diagnostic, Diagnostic, DisplayDiagnosticConfig, @@ -20,6 +16,10 @@ use ruff_db::testing::{setup_logging, setup_logging_with_filter}; use ruff_source_file::{LineIndex, OneIndexed}; use std::backtrace::BacktraceStatus; use std::fmt::Write; +use ty_python_semantic::types::check_types; +use ty_python_semantic::{ + Program, ProgramSettings, PythonPath, PythonPlatform, SearchPathSettings, SysPrefixPathOrigin, +}; mod assertion; mod config; @@ -104,7 +104,7 @@ pub fn run( "\nTo rerun this specific test, set the environment variable: {MDTEST_TEST_FILTER}='{escaped_test_name}'", ); println!( - "{MDTEST_TEST_FILTER}='{escaped_test_name}' cargo test -p red_knot_python_semantic --test mdtest -- {test_name}", + "{MDTEST_TEST_FILTER}='{escaped_test_name}' cargo test -p ty_python_semantic --test mdtest -- {test_name}", ); } } diff --git a/crates/red_knot_test/src/matcher.rs b/crates/ty_test/src/matcher.rs similarity index 99% rename from crates/red_knot_test/src/matcher.rs rename to crates/ty_test/src/matcher.rs index 4be6658b00..4beeb478e7 100644 --- a/crates/red_knot_test/src/matcher.rs +++ b/crates/ty_test/src/matcher.rs @@ -343,7 +343,6 @@ impl Matcher { #[cfg(test)] mod tests { use super::FailuresByLine; - use red_knot_python_semantic::{Program, ProgramSettings, PythonPlatform, SearchPathSettings}; use ruff_db::diagnostic::{Annotation, Diagnostic, DiagnosticId, Severity, Span}; use ruff_db::files::{system_path_to_file, File}; use ruff_db::system::DbWithWritableSystem as _; @@ -351,6 +350,7 @@ mod tests { use ruff_python_trivia::textwrap::dedent; use ruff_source_file::OneIndexed; use ruff_text_size::TextRange; + use ty_python_semantic::{Program, ProgramSettings, PythonPlatform, SearchPathSettings}; struct ExpectedDiagnostic { id: DiagnosticId, diff --git a/crates/red_knot_test/src/parser.rs b/crates/ty_test/src/parser.rs similarity index 100% rename from crates/red_knot_test/src/parser.rs rename to crates/ty_test/src/parser.rs diff --git a/crates/red_knot_vendored/.gitignore b/crates/ty_vendored/.gitignore similarity index 100% rename from crates/red_knot_vendored/.gitignore rename to crates/ty_vendored/.gitignore diff --git a/crates/red_knot_vendored/Cargo.toml b/crates/ty_vendored/Cargo.toml similarity index 95% rename from crates/red_knot_vendored/Cargo.toml rename to crates/ty_vendored/Cargo.toml index b740bef3f4..bd8f8e175b 100644 --- a/crates/red_knot_vendored/Cargo.toml +++ b/crates/ty_vendored/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "red_knot_vendored" +name = "ty_vendored" version = "0.0.0" publish = false authors = { workspace = true } diff --git a/crates/red_knot_vendored/README.md b/crates/ty_vendored/README.md similarity index 69% rename from crates/red_knot_vendored/README.md rename to crates/ty_vendored/README.md index dd9a5849b0..40ab2fc04f 100644 --- a/crates/red_knot_vendored/README.md +++ b/crates/ty_vendored/README.md @@ -1,5 +1,5 @@ # 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/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. +This crate vendors [typeshed](https://github.com/python/typeshed)'s stubs for the standard library. The vendored stubs can be found in `crates/ty_vendored/vendor/typeshed`. The file `crates/ty_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). diff --git a/crates/red_knot_vendored/build.rs b/crates/ty_vendored/build.rs similarity index 86% rename from crates/red_knot_vendored/build.rs rename to crates/ty_vendored/build.rs index 2062db3d6e..86b1fb843a 100644 --- a/crates/red_knot_vendored/build.rs +++ b/crates/ty_vendored/build.rs @@ -3,7 +3,7 @@ //! //! This script should be automatically run at build time //! whenever the script itself changes, or whenever any files -//! in `crates/red_knot_vendored/vendor/typeshed` change. +//! in `crates/ty_vendored/vendor/typeshed` change. use std::fs::File; use std::io::Write; @@ -15,11 +15,11 @@ use zip::write::{FileOptions, ZipWriter}; use zip::CompressionMethod; const TYPESHED_SOURCE_DIR: &str = "vendor/typeshed"; -const KNOT_EXTENSIONS_STUBS: &str = "knot_extensions/knot_extensions.pyi"; +const TY_EXTENSIONS_STUBS: &str = "ty_extensions/ty_extensions.pyi"; const TYPESHED_ZIP_LOCATION: &str = "/zipped_typeshed.zip"; /// Recursively zip the contents of the entire typeshed directory and patch typeshed -/// on the fly to include the `knot_extensions` module. +/// on the fly to include the `ty_extensions` module. /// /// This routine is adapted from a recipe at /// @@ -62,9 +62,9 @@ fn write_zipped_typeshed_to(writer: File) -> ZipResult { let mut f = File::open(absolute_path)?; std::io::copy(&mut f, &mut zip).unwrap(); - // Patch the VERSIONS file to make `knot_extensions` available + // Patch the VERSIONS file to make `ty_extensions` available if normalized_relative_path == "stdlib/VERSIONS" { - writeln!(&mut zip, "knot_extensions: 3.0-")?; + writeln!(&mut zip, "ty_extensions: 3.0-")?; } } else if !normalized_relative_path.is_empty() { // Only if not root! Avoids path spec / warning @@ -74,10 +74,10 @@ fn write_zipped_typeshed_to(writer: File) -> ZipResult { } } - // Patch typeshed and add the stubs for the `knot_extensions` module - println!("adding file {KNOT_EXTENSIONS_STUBS} as stdlib/knot_extensions.pyi ..."); - zip.start_file("stdlib/knot_extensions.pyi", options)?; - let mut f = File::open(KNOT_EXTENSIONS_STUBS)?; + // Patch typeshed and add the stubs for the `ty_extensions` module + println!("adding file {TY_EXTENSIONS_STUBS} as stdlib/ty_extensions.pyi ..."); + zip.start_file("stdlib/ty_extensions.pyi", options)?; + let mut f = File::open(TY_EXTENSIONS_STUBS)?; std::io::copy(&mut f, &mut zip).unwrap(); zip.finish() diff --git a/crates/red_knot_vendored/src/lib.rs b/crates/ty_vendored/src/lib.rs similarity index 100% rename from crates/red_knot_vendored/src/lib.rs rename to crates/ty_vendored/src/lib.rs diff --git a/crates/ty_vendored/ty_extensions/README.md b/crates/ty_vendored/ty_extensions/README.md new file mode 100644 index 0000000000..594f6c98fa --- /dev/null +++ b/crates/ty_vendored/ty_extensions/README.md @@ -0,0 +1,2 @@ +The `build.rs` copies the `ty_extensions.pyi` file in this directory into +the `vendor/typeshed/stdlib` directory. diff --git a/crates/red_knot_vendored/knot_extensions/knot_extensions.pyi b/crates/ty_vendored/ty_extensions/ty_extensions.pyi similarity index 100% rename from crates/red_knot_vendored/knot_extensions/knot_extensions.pyi rename to crates/ty_vendored/ty_extensions/ty_extensions.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/LICENSE b/crates/ty_vendored/vendor/typeshed/LICENSE similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/LICENSE rename to crates/ty_vendored/vendor/typeshed/LICENSE diff --git a/crates/red_knot_vendored/vendor/typeshed/README.md b/crates/ty_vendored/vendor/typeshed/README.md similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/README.md rename to crates/ty_vendored/vendor/typeshed/README.md diff --git a/crates/red_knot_vendored/vendor/typeshed/source_commit.txt b/crates/ty_vendored/vendor/typeshed/source_commit.txt similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/source_commit.txt rename to crates/ty_vendored/vendor/typeshed/source_commit.txt diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/VERSIONS b/crates/ty_vendored/vendor/typeshed/stdlib/VERSIONS similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/VERSIONS rename to crates/ty_vendored/vendor/typeshed/stdlib/VERSIONS diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/__future__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/__future__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/__future__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/__future__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/__main__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/__main__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/__main__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/__main__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_ast.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_ast.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_ast.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_ast.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_asyncio.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_asyncio.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_asyncio.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_asyncio.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_bisect.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_bisect.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_bisect.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_bisect.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_blake2.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_blake2.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_blake2.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_blake2.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_bootlocale.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_bootlocale.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_bootlocale.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_bootlocale.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_bz2.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_bz2.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_bz2.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_bz2.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_codecs.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_codecs.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_codecs.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_codecs.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_collections_abc.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_collections_abc.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_collections_abc.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_collections_abc.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_compat_pickle.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_compat_pickle.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_compat_pickle.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_compat_pickle.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_compression.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_compression.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_compression.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_compression.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_contextvars.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_contextvars.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_contextvars.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_contextvars.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_csv.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_csv.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_csv.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_csv.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_ctypes.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_ctypes.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_ctypes.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_ctypes.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_curses.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_curses.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_curses.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_curses.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_curses_panel.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_curses_panel.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_curses_panel.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_curses_panel.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_dbm.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_dbm.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_dbm.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_dbm.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_decimal.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_decimal.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_decimal.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_decimal.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_frozen_importlib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_frozen_importlib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_frozen_importlib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_frozen_importlib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_frozen_importlib_external.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_frozen_importlib_external.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_frozen_importlib_external.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_frozen_importlib_external.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_gdbm.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_gdbm.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_gdbm.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_gdbm.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_hashlib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_hashlib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_hashlib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_hashlib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_heapq.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_heapq.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_heapq.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_heapq.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_imp.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_imp.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_imp.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_imp.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_interpchannels.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_interpchannels.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_interpchannels.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_interpchannels.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_interpqueues.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_interpqueues.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_interpqueues.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_interpqueues.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_interpreters.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_interpreters.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_interpreters.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_interpreters.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_io.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_io.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_io.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_io.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_json.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_json.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_json.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_json.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_locale.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_locale.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_locale.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_locale.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_lsprof.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_lsprof.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_lsprof.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_lsprof.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_lzma.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_lzma.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_lzma.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_lzma.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_markupbase.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_markupbase.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_markupbase.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_markupbase.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_msi.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_msi.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_msi.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_msi.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_multibytecodec.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_multibytecodec.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_multibytecodec.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_multibytecodec.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_operator.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_operator.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_operator.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_operator.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_osx_support.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_osx_support.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_osx_support.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_osx_support.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_pickle.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_pickle.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_pickle.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_pickle.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_posixsubprocess.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_posixsubprocess.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_posixsubprocess.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_posixsubprocess.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_py_abc.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_py_abc.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_py_abc.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_py_abc.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_pydecimal.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_pydecimal.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_pydecimal.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_pydecimal.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_queue.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_queue.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_queue.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_queue.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_random.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_random.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_random.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_random.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_sitebuiltins.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_sitebuiltins.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_sitebuiltins.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_sitebuiltins.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_socket.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_socket.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_socket.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_socket.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_sqlite3.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_sqlite3.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_sqlite3.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_sqlite3.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_ssl.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_ssl.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_ssl.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_ssl.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_stat.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_stat.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_stat.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_stat.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_struct.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_struct.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_struct.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_struct.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_thread.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_thread.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_thread.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_thread.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_threading_local.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_threading_local.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_threading_local.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_threading_local.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_tkinter.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_tkinter.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_tkinter.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_tkinter.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_tracemalloc.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_tracemalloc.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_tracemalloc.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_tracemalloc.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_typeshed/README.md b/crates/ty_vendored/vendor/typeshed/stdlib/_typeshed/README.md similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_typeshed/README.md rename to crates/ty_vendored/vendor/typeshed/stdlib/_typeshed/README.md diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_typeshed/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_typeshed/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_typeshed/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_typeshed/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_typeshed/dbapi.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_typeshed/dbapi.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_typeshed/dbapi.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_typeshed/dbapi.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_typeshed/importlib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_typeshed/importlib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_typeshed/importlib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_typeshed/importlib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_typeshed/wsgi.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_typeshed/wsgi.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_typeshed/wsgi.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_typeshed/wsgi.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_typeshed/xml.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_typeshed/xml.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_typeshed/xml.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_typeshed/xml.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_warnings.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_warnings.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_warnings.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_warnings.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_weakref.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_weakref.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_weakref.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_weakref.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_weakrefset.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_weakrefset.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_weakrefset.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_weakrefset.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/_winapi.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/_winapi.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/_winapi.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/_winapi.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/abc.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/abc.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/abc.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/abc.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/aifc.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/aifc.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/aifc.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/aifc.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/antigravity.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/antigravity.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/antigravity.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/antigravity.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/argparse.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/argparse.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/argparse.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/argparse.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/array.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/array.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/array.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/array.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/ast.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/ast.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/ast.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/ast.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asynchat.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asynchat.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asynchat.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asynchat.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/base_events.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/base_events.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/base_events.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/base_events.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/base_futures.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/base_futures.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/base_futures.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/base_futures.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/base_subprocess.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/base_subprocess.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/base_subprocess.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/base_subprocess.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/base_tasks.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/base_tasks.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/base_tasks.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/base_tasks.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/constants.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/constants.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/constants.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/constants.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/coroutines.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/coroutines.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/coroutines.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/coroutines.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/events.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/events.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/events.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/events.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/exceptions.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/exceptions.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/exceptions.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/exceptions.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/format_helpers.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/format_helpers.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/format_helpers.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/format_helpers.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/futures.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/futures.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/futures.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/futures.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/locks.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/locks.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/locks.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/locks.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/log.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/log.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/log.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/log.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/mixins.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/mixins.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/mixins.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/mixins.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/proactor_events.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/proactor_events.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/proactor_events.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/proactor_events.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/protocols.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/protocols.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/protocols.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/protocols.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/queues.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/queues.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/queues.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/queues.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/runners.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/runners.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/runners.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/runners.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/selector_events.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/selector_events.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/selector_events.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/selector_events.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/sslproto.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/sslproto.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/sslproto.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/sslproto.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/staggered.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/staggered.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/staggered.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/staggered.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/streams.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/streams.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/streams.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/streams.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/subprocess.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/subprocess.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/subprocess.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/subprocess.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/taskgroups.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/taskgroups.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/taskgroups.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/taskgroups.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/tasks.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/tasks.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/tasks.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/tasks.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/threads.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/threads.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/threads.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/threads.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/timeouts.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/timeouts.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/timeouts.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/timeouts.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/transports.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/transports.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/transports.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/transports.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/trsock.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/trsock.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/trsock.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/trsock.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/unix_events.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/unix_events.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/unix_events.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/unix_events.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/windows_events.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/windows_events.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/windows_events.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/windows_events.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/windows_utils.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncio/windows_utils.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncio/windows_utils.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncio/windows_utils.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/asyncore.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/asyncore.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/asyncore.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/asyncore.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/atexit.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/atexit.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/atexit.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/atexit.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/audioop.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/audioop.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/audioop.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/audioop.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/base64.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/base64.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/base64.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/base64.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/bdb.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/bdb.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/bdb.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/bdb.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/binascii.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/binascii.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/binascii.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/binascii.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/binhex.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/binhex.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/binhex.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/binhex.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/bisect.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/bisect.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/bisect.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/bisect.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/builtins.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/builtins.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/builtins.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/builtins.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/bz2.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/bz2.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/bz2.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/bz2.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/cProfile.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/cProfile.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/cProfile.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/cProfile.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/calendar.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/calendar.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/calendar.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/calendar.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/cgi.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/cgi.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/cgi.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/cgi.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/cgitb.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/cgitb.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/cgitb.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/cgitb.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/chunk.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/chunk.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/chunk.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/chunk.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/cmath.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/cmath.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/cmath.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/cmath.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/cmd.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/cmd.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/cmd.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/cmd.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/code.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/code.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/code.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/code.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/codecs.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/codecs.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/codecs.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/codecs.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/codeop.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/codeop.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/codeop.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/codeop.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/collections/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/collections/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/collections/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/collections/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/collections/abc.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/collections/abc.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/collections/abc.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/collections/abc.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/colorsys.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/colorsys.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/colorsys.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/colorsys.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/compileall.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/compileall.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/compileall.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/compileall.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/concurrent/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/concurrent/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/concurrent/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/concurrent/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/concurrent/futures/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/concurrent/futures/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/concurrent/futures/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/concurrent/futures/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/concurrent/futures/_base.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/concurrent/futures/_base.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/concurrent/futures/_base.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/concurrent/futures/_base.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/concurrent/futures/process.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/concurrent/futures/process.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/concurrent/futures/process.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/concurrent/futures/process.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/concurrent/futures/thread.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/concurrent/futures/thread.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/concurrent/futures/thread.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/concurrent/futures/thread.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/configparser.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/configparser.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/configparser.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/configparser.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/contextlib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/contextlib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/contextlib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/contextlib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/contextvars.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/contextvars.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/contextvars.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/contextvars.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/copy.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/copy.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/copy.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/copy.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/copyreg.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/copyreg.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/copyreg.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/copyreg.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/crypt.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/crypt.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/crypt.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/crypt.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/csv.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/csv.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/csv.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/csv.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/ctypes/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/ctypes/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/ctypes/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/ctypes/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/ctypes/_endian.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/ctypes/_endian.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/ctypes/_endian.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/ctypes/_endian.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/ctypes/macholib/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/ctypes/macholib/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/ctypes/macholib/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/ctypes/macholib/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/ctypes/macholib/dyld.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/ctypes/macholib/dyld.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/ctypes/macholib/dyld.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/ctypes/macholib/dyld.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/ctypes/macholib/dylib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/ctypes/macholib/dylib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/ctypes/macholib/dylib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/ctypes/macholib/dylib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/ctypes/macholib/framework.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/ctypes/macholib/framework.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/ctypes/macholib/framework.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/ctypes/macholib/framework.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/ctypes/util.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/ctypes/util.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/ctypes/util.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/ctypes/util.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/ctypes/wintypes.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/ctypes/wintypes.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/ctypes/wintypes.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/ctypes/wintypes.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/curses/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/curses/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/curses/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/curses/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/curses/ascii.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/curses/ascii.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/curses/ascii.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/curses/ascii.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/curses/has_key.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/curses/has_key.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/curses/has_key.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/curses/has_key.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/curses/panel.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/curses/panel.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/curses/panel.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/curses/panel.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/curses/textpad.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/curses/textpad.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/curses/textpad.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/curses/textpad.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/dataclasses.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/dataclasses.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/dataclasses.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/dataclasses.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/datetime.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/datetime.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/datetime.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/datetime.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/dbm/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/dbm/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/dbm/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/dbm/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/dbm/dumb.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/dbm/dumb.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/dbm/dumb.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/dbm/dumb.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/dbm/gnu.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/dbm/gnu.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/dbm/gnu.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/dbm/gnu.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/dbm/ndbm.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/dbm/ndbm.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/dbm/ndbm.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/dbm/ndbm.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/dbm/sqlite3.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/dbm/sqlite3.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/dbm/sqlite3.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/dbm/sqlite3.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/decimal.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/decimal.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/decimal.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/decimal.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/difflib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/difflib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/difflib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/difflib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/dis.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/dis.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/dis.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/dis.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/_msvccompiler.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/_msvccompiler.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/_msvccompiler.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/_msvccompiler.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/archive_util.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/archive_util.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/archive_util.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/archive_util.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/bcppcompiler.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/bcppcompiler.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/bcppcompiler.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/bcppcompiler.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/ccompiler.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/ccompiler.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/ccompiler.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/ccompiler.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/cmd.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/cmd.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/cmd.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/cmd.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/bdist.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/bdist.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/bdist.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/bdist.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/bdist_dumb.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/bdist_dumb.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/bdist_dumb.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/bdist_dumb.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/bdist_msi.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/bdist_msi.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/bdist_msi.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/bdist_msi.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/bdist_packager.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/bdist_packager.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/bdist_packager.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/bdist_packager.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/bdist_rpm.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/bdist_rpm.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/bdist_rpm.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/bdist_rpm.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/bdist_wininst.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/bdist_wininst.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/bdist_wininst.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/bdist_wininst.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/build.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/build.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/build.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/build.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/build_clib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/build_clib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/build_clib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/build_clib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/build_ext.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/build_ext.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/build_ext.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/build_ext.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/build_py.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/build_py.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/build_py.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/build_py.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/build_scripts.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/build_scripts.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/build_scripts.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/build_scripts.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/check.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/check.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/check.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/check.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/clean.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/clean.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/clean.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/clean.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/config.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/config.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/config.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/config.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/install.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/install.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/install.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/install.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/install_data.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/install_data.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/install_data.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/install_data.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/install_egg_info.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/install_egg_info.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/install_egg_info.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/install_egg_info.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/install_headers.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/install_headers.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/install_headers.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/install_headers.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/install_lib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/install_lib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/install_lib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/install_lib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/install_scripts.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/install_scripts.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/install_scripts.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/install_scripts.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/register.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/register.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/register.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/register.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/sdist.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/sdist.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/sdist.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/sdist.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/upload.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/upload.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/command/upload.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/command/upload.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/config.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/config.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/config.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/config.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/core.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/core.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/core.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/core.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/cygwinccompiler.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/cygwinccompiler.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/cygwinccompiler.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/cygwinccompiler.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/debug.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/debug.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/debug.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/debug.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/dep_util.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/dep_util.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/dep_util.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/dep_util.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/dir_util.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/dir_util.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/dir_util.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/dir_util.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/dist.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/dist.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/dist.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/dist.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/errors.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/errors.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/errors.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/errors.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/extension.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/extension.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/extension.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/extension.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/fancy_getopt.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/fancy_getopt.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/fancy_getopt.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/fancy_getopt.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/file_util.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/file_util.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/file_util.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/file_util.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/filelist.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/filelist.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/filelist.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/filelist.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/log.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/log.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/log.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/log.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/msvccompiler.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/msvccompiler.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/msvccompiler.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/msvccompiler.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/spawn.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/spawn.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/spawn.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/spawn.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/sysconfig.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/sysconfig.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/sysconfig.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/sysconfig.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/text_file.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/text_file.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/text_file.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/text_file.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/unixccompiler.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/unixccompiler.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/unixccompiler.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/unixccompiler.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/util.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/util.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/util.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/util.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/version.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/distutils/version.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/distutils/version.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/distutils/version.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/doctest.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/doctest.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/doctest.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/doctest.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/_header_value_parser.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/_header_value_parser.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/_header_value_parser.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/_header_value_parser.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/_policybase.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/_policybase.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/_policybase.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/_policybase.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/base64mime.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/base64mime.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/base64mime.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/base64mime.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/charset.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/charset.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/charset.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/charset.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/contentmanager.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/contentmanager.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/contentmanager.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/contentmanager.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/encoders.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/encoders.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/encoders.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/encoders.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/errors.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/errors.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/errors.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/errors.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/feedparser.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/feedparser.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/feedparser.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/feedparser.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/generator.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/generator.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/generator.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/generator.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/header.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/header.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/header.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/header.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/headerregistry.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/headerregistry.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/headerregistry.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/headerregistry.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/iterators.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/iterators.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/iterators.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/iterators.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/message.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/message.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/message.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/message.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/mime/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/mime/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/mime/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/mime/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/mime/application.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/mime/application.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/mime/application.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/mime/application.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/mime/audio.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/mime/audio.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/mime/audio.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/mime/audio.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/mime/base.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/mime/base.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/mime/base.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/mime/base.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/mime/image.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/mime/image.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/mime/image.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/mime/image.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/mime/message.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/mime/message.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/mime/message.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/mime/message.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/mime/multipart.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/mime/multipart.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/mime/multipart.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/mime/multipart.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/mime/nonmultipart.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/mime/nonmultipart.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/mime/nonmultipart.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/mime/nonmultipart.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/mime/text.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/mime/text.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/mime/text.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/mime/text.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/parser.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/parser.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/parser.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/parser.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/policy.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/policy.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/policy.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/policy.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/quoprimime.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/quoprimime.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/quoprimime.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/quoprimime.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/email/utils.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/email/utils.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/email/utils.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/email/utils.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/aliases.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/aliases.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/aliases.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/aliases.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/ascii.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/ascii.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/ascii.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/ascii.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/base64_codec.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/base64_codec.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/base64_codec.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/base64_codec.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/big5.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/big5.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/big5.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/big5.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/big5hkscs.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/big5hkscs.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/big5hkscs.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/big5hkscs.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/bz2_codec.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/bz2_codec.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/bz2_codec.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/bz2_codec.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/charmap.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/charmap.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/charmap.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/charmap.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp037.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp037.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp037.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp037.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1006.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1006.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1006.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1006.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1026.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1026.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1026.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1026.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1125.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1125.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1125.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1125.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1140.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1140.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1140.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1140.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1250.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1250.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1250.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1250.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1251.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1251.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1251.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1251.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1252.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1252.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1252.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1252.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1253.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1253.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1253.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1253.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1254.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1254.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1254.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1254.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1255.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1255.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1255.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1255.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1256.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1256.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1256.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1256.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1257.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1257.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1257.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1257.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1258.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1258.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp1258.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp1258.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp273.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp273.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp273.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp273.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp424.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp424.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp424.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp424.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp437.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp437.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp437.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp437.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp500.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp500.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp500.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp500.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp720.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp720.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp720.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp720.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp737.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp737.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp737.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp737.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp775.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp775.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp775.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp775.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp850.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp850.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp850.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp850.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp852.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp852.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp852.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp852.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp855.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp855.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp855.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp855.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp856.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp856.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp856.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp856.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp857.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp857.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp857.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp857.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp858.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp858.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp858.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp858.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp860.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp860.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp860.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp860.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp861.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp861.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp861.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp861.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp862.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp862.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp862.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp862.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp863.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp863.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp863.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp863.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp864.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp864.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp864.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp864.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp865.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp865.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp865.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp865.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp866.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp866.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp866.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp866.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp869.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp869.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp869.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp869.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp874.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp874.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp874.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp874.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp875.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp875.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp875.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp875.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp932.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp932.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp932.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp932.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp949.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp949.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp949.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp949.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp950.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp950.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/cp950.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/cp950.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/euc_jis_2004.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/euc_jis_2004.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/euc_jis_2004.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/euc_jis_2004.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/euc_jisx0213.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/euc_jisx0213.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/euc_jisx0213.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/euc_jisx0213.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/euc_jp.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/euc_jp.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/euc_jp.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/euc_jp.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/euc_kr.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/euc_kr.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/euc_kr.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/euc_kr.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/gb18030.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/gb18030.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/gb18030.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/gb18030.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/gb2312.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/gb2312.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/gb2312.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/gb2312.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/gbk.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/gbk.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/gbk.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/gbk.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/hex_codec.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/hex_codec.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/hex_codec.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/hex_codec.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/hp_roman8.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/hp_roman8.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/hp_roman8.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/hp_roman8.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/hz.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/hz.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/hz.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/hz.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/idna.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/idna.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/idna.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/idna.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp_1.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp_1.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp_1.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp_1.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp_2.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp_2.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp_2.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp_2.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp_2004.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp_2004.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp_2004.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp_2004.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp_3.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp_3.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp_3.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp_3.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp_ext.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp_ext.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp_ext.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso2022_jp_ext.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso2022_kr.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso2022_kr.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso2022_kr.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso2022_kr.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_1.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_1.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_1.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_1.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_10.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_10.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_10.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_10.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_11.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_11.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_11.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_11.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_13.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_13.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_13.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_13.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_14.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_14.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_14.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_14.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_15.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_15.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_15.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_15.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_16.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_16.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_16.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_16.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_2.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_2.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_2.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_2.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_3.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_3.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_3.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_3.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_4.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_4.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_4.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_4.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_5.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_5.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_5.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_5.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_6.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_6.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_6.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_6.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_7.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_7.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_7.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_7.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_8.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_8.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_8.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_8.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_9.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_9.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/iso8859_9.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/iso8859_9.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/johab.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/johab.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/johab.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/johab.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/koi8_r.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/koi8_r.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/koi8_r.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/koi8_r.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/koi8_t.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/koi8_t.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/koi8_t.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/koi8_t.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/koi8_u.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/koi8_u.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/koi8_u.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/koi8_u.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/kz1048.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/kz1048.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/kz1048.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/kz1048.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/latin_1.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/latin_1.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/latin_1.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/latin_1.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/mac_arabic.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/mac_arabic.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/mac_arabic.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/mac_arabic.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/mac_croatian.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/mac_croatian.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/mac_croatian.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/mac_croatian.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/mac_cyrillic.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/mac_cyrillic.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/mac_cyrillic.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/mac_cyrillic.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/mac_farsi.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/mac_farsi.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/mac_farsi.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/mac_farsi.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/mac_greek.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/mac_greek.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/mac_greek.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/mac_greek.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/mac_iceland.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/mac_iceland.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/mac_iceland.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/mac_iceland.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/mac_latin2.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/mac_latin2.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/mac_latin2.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/mac_latin2.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/mac_roman.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/mac_roman.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/mac_roman.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/mac_roman.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/mac_romanian.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/mac_romanian.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/mac_romanian.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/mac_romanian.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/mac_turkish.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/mac_turkish.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/mac_turkish.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/mac_turkish.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/mbcs.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/mbcs.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/mbcs.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/mbcs.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/oem.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/oem.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/oem.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/oem.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/palmos.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/palmos.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/palmos.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/palmos.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/ptcp154.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/ptcp154.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/ptcp154.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/ptcp154.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/punycode.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/punycode.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/punycode.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/punycode.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/quopri_codec.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/quopri_codec.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/quopri_codec.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/quopri_codec.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/raw_unicode_escape.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/raw_unicode_escape.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/raw_unicode_escape.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/raw_unicode_escape.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/rot_13.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/rot_13.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/rot_13.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/rot_13.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/shift_jis.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/shift_jis.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/shift_jis.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/shift_jis.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/shift_jis_2004.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/shift_jis_2004.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/shift_jis_2004.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/shift_jis_2004.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/shift_jisx0213.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/shift_jisx0213.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/shift_jisx0213.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/shift_jisx0213.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/tis_620.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/tis_620.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/tis_620.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/tis_620.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/undefined.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/undefined.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/undefined.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/undefined.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/unicode_escape.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/unicode_escape.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/unicode_escape.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/unicode_escape.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/utf_16.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/utf_16.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/utf_16.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/utf_16.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/utf_16_be.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/utf_16_be.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/utf_16_be.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/utf_16_be.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/utf_16_le.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/utf_16_le.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/utf_16_le.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/utf_16_le.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/utf_32.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/utf_32.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/utf_32.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/utf_32.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/utf_32_be.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/utf_32_be.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/utf_32_be.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/utf_32_be.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/utf_32_le.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/utf_32_le.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/utf_32_le.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/utf_32_le.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/utf_7.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/utf_7.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/utf_7.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/utf_7.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/utf_8.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/utf_8.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/utf_8.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/utf_8.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/utf_8_sig.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/utf_8_sig.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/utf_8_sig.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/utf_8_sig.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/uu_codec.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/uu_codec.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/uu_codec.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/uu_codec.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/zlib_codec.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/encodings/zlib_codec.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/encodings/zlib_codec.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/encodings/zlib_codec.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/ensurepip/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/ensurepip/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/ensurepip/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/ensurepip/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/enum.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/enum.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/enum.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/enum.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/errno.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/errno.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/errno.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/errno.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/faulthandler.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/faulthandler.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/faulthandler.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/faulthandler.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/fcntl.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/fcntl.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/fcntl.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/fcntl.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/filecmp.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/filecmp.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/filecmp.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/filecmp.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/fileinput.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/fileinput.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/fileinput.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/fileinput.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/fnmatch.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/fnmatch.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/fnmatch.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/fnmatch.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/formatter.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/formatter.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/formatter.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/formatter.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/fractions.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/fractions.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/fractions.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/fractions.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/ftplib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/ftplib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/ftplib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/ftplib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/functools.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/functools.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/functools.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/functools.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/gc.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/gc.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/gc.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/gc.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/genericpath.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/genericpath.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/genericpath.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/genericpath.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/getopt.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/getopt.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/getopt.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/getopt.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/getpass.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/getpass.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/getpass.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/getpass.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/gettext.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/gettext.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/gettext.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/gettext.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/glob.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/glob.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/glob.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/glob.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/graphlib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/graphlib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/graphlib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/graphlib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/grp.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/grp.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/grp.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/grp.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/gzip.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/gzip.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/gzip.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/gzip.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/hashlib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/hashlib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/hashlib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/hashlib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/heapq.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/heapq.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/heapq.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/heapq.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/hmac.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/hmac.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/hmac.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/hmac.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/html/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/html/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/html/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/html/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/html/entities.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/html/entities.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/html/entities.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/html/entities.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/html/parser.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/html/parser.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/html/parser.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/html/parser.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/http/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/http/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/http/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/http/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/http/client.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/http/client.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/http/client.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/http/client.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/http/cookiejar.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/http/cookiejar.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/http/cookiejar.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/http/cookiejar.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/http/cookies.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/http/cookies.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/http/cookies.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/http/cookies.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/http/server.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/http/server.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/http/server.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/http/server.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/imaplib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/imaplib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/imaplib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/imaplib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/imghdr.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/imghdr.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/imghdr.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/imghdr.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/imp.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/imp.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/imp.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/imp.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/importlib/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/importlib/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/_abc.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/importlib/_abc.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/_abc.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/importlib/_abc.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/_bootstrap.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/importlib/_bootstrap.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/_bootstrap.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/importlib/_bootstrap.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/_bootstrap_external.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/importlib/_bootstrap_external.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/_bootstrap_external.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/importlib/_bootstrap_external.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/abc.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/importlib/abc.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/abc.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/importlib/abc.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/machinery.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/importlib/machinery.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/machinery.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/importlib/machinery.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/metadata/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/importlib/metadata/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/metadata/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/importlib/metadata/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/metadata/_meta.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/importlib/metadata/_meta.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/metadata/_meta.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/importlib/metadata/_meta.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/metadata/diagnose.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/importlib/metadata/diagnose.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/metadata/diagnose.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/importlib/metadata/diagnose.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/readers.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/importlib/readers.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/readers.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/importlib/readers.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/resources/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/importlib/resources/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/resources/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/importlib/resources/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/resources/_common.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/importlib/resources/_common.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/resources/_common.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/importlib/resources/_common.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/resources/_functional.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/importlib/resources/_functional.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/resources/_functional.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/importlib/resources/_functional.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/resources/abc.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/importlib/resources/abc.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/resources/abc.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/importlib/resources/abc.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/resources/readers.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/importlib/resources/readers.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/resources/readers.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/importlib/resources/readers.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/resources/simple.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/importlib/resources/simple.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/resources/simple.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/importlib/resources/simple.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/simple.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/importlib/simple.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/simple.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/importlib/simple.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/util.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/importlib/util.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/importlib/util.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/importlib/util.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/inspect.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/inspect.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/inspect.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/inspect.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/io.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/io.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/io.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/io.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/ipaddress.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/ipaddress.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/ipaddress.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/ipaddress.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/itertools.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/itertools.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/itertools.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/itertools.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/json/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/json/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/json/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/json/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/json/decoder.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/json/decoder.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/json/decoder.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/json/decoder.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/json/encoder.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/json/encoder.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/json/encoder.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/json/encoder.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/json/scanner.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/json/scanner.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/json/scanner.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/json/scanner.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/json/tool.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/json/tool.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/json/tool.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/json/tool.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/keyword.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/keyword.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/keyword.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/keyword.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/btm_matcher.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/btm_matcher.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/btm_matcher.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/btm_matcher.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixer_base.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixer_base.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixer_base.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixer_base.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_apply.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_apply.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_apply.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_apply.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_asserts.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_asserts.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_asserts.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_asserts.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_basestring.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_basestring.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_basestring.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_basestring.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_buffer.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_buffer.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_buffer.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_buffer.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_dict.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_dict.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_dict.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_dict.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_except.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_except.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_except.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_except.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_exec.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_exec.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_exec.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_exec.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_execfile.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_execfile.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_execfile.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_execfile.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_exitfunc.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_exitfunc.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_exitfunc.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_exitfunc.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_filter.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_filter.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_filter.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_filter.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_funcattrs.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_funcattrs.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_funcattrs.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_funcattrs.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_future.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_future.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_future.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_future.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_getcwdu.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_getcwdu.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_getcwdu.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_getcwdu.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_has_key.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_has_key.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_has_key.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_has_key.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_idioms.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_idioms.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_idioms.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_idioms.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_import.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_import.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_import.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_import.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_imports.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_imports.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_imports.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_imports.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_imports2.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_imports2.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_imports2.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_imports2.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_input.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_input.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_input.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_input.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_intern.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_intern.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_intern.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_intern.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_isinstance.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_isinstance.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_isinstance.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_isinstance.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_itertools.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_itertools.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_itertools.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_itertools.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_itertools_imports.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_itertools_imports.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_itertools_imports.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_itertools_imports.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_long.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_long.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_long.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_long.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_map.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_map.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_map.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_map.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_metaclass.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_metaclass.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_metaclass.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_metaclass.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_methodattrs.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_methodattrs.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_methodattrs.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_methodattrs.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_ne.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_ne.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_ne.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_ne.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_next.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_next.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_next.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_next.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_nonzero.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_nonzero.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_nonzero.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_nonzero.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_numliterals.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_numliterals.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_numliterals.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_numliterals.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_operator.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_operator.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_operator.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_operator.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_paren.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_paren.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_paren.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_paren.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_print.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_print.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_print.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_print.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_raise.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_raise.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_raise.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_raise.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_raw_input.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_raw_input.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_raw_input.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_raw_input.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_reduce.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_reduce.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_reduce.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_reduce.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_reload.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_reload.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_reload.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_reload.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_renames.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_renames.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_renames.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_renames.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_repr.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_repr.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_repr.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_repr.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_set_literal.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_set_literal.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_set_literal.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_set_literal.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_standarderror.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_standarderror.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_standarderror.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_standarderror.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_sys_exc.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_sys_exc.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_sys_exc.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_sys_exc.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_throw.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_throw.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_throw.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_throw.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_tuple_params.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_tuple_params.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_tuple_params.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_tuple_params.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_types.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_types.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_types.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_types.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_unicode.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_unicode.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_unicode.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_unicode.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_urllib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_urllib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_urllib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_urllib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_ws_comma.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_ws_comma.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_ws_comma.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_ws_comma.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_xrange.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_xrange.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_xrange.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_xrange.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_xreadlines.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_xreadlines.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_xreadlines.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_xreadlines.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_zip.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_zip.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_zip.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/fixes/fix_zip.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/main.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/main.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/main.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/main.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/driver.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/driver.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/driver.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/driver.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/grammar.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/grammar.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/grammar.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/grammar.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/literals.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/literals.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/literals.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/literals.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/parse.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/parse.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/parse.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/parse.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/pgen.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/pgen.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/pgen.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/pgen.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/token.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/token.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/token.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/token.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/tokenize.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/tokenize.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/tokenize.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/pgen2/tokenize.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/pygram.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/pygram.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/pygram.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/pygram.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/pytree.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/pytree.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/pytree.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/pytree.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/refactor.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/refactor.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lib2to3/refactor.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lib2to3/refactor.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/linecache.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/linecache.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/linecache.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/linecache.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/locale.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/locale.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/locale.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/locale.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/logging/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/logging/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/logging/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/logging/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/logging/config.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/logging/config.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/logging/config.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/logging/config.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/logging/handlers.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/logging/handlers.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/logging/handlers.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/logging/handlers.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/lzma.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/lzma.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/lzma.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/lzma.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/mailbox.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/mailbox.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/mailbox.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/mailbox.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/mailcap.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/mailcap.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/mailcap.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/mailcap.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/marshal.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/marshal.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/marshal.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/marshal.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/math.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/math.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/math.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/math.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/mimetypes.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/mimetypes.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/mimetypes.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/mimetypes.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/mmap.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/mmap.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/mmap.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/mmap.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/modulefinder.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/modulefinder.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/modulefinder.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/modulefinder.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/msilib/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/msilib/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/msilib/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/msilib/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/msilib/schema.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/msilib/schema.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/msilib/schema.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/msilib/schema.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/msilib/sequence.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/msilib/sequence.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/msilib/sequence.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/msilib/sequence.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/msilib/text.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/msilib/text.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/msilib/text.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/msilib/text.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/msvcrt.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/msvcrt.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/msvcrt.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/msvcrt.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/connection.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/connection.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/connection.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/connection.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/context.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/context.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/context.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/context.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/dummy/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/dummy/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/dummy/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/dummy/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/dummy/connection.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/dummy/connection.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/dummy/connection.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/dummy/connection.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/forkserver.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/forkserver.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/forkserver.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/forkserver.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/heap.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/heap.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/heap.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/heap.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/managers.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/managers.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/managers.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/managers.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/pool.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/pool.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/pool.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/pool.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/popen_fork.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/popen_fork.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/popen_fork.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/popen_fork.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/popen_forkserver.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/popen_forkserver.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/popen_forkserver.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/popen_forkserver.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/popen_spawn_posix.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/popen_spawn_posix.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/popen_spawn_posix.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/popen_spawn_posix.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/popen_spawn_win32.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/popen_spawn_win32.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/popen_spawn_win32.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/popen_spawn_win32.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/process.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/process.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/process.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/process.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/queues.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/queues.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/queues.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/queues.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/reduction.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/reduction.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/reduction.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/reduction.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/resource_sharer.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/resource_sharer.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/resource_sharer.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/resource_sharer.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/resource_tracker.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/resource_tracker.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/resource_tracker.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/resource_tracker.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/shared_memory.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/shared_memory.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/shared_memory.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/shared_memory.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/sharedctypes.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/sharedctypes.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/sharedctypes.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/sharedctypes.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/spawn.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/spawn.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/spawn.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/spawn.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/synchronize.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/synchronize.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/synchronize.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/synchronize.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/util.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/util.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/multiprocessing/util.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/multiprocessing/util.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/netrc.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/netrc.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/netrc.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/netrc.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/nis.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/nis.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/nis.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/nis.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/nntplib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/nntplib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/nntplib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/nntplib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/nt.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/nt.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/nt.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/nt.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/ntpath.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/ntpath.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/ntpath.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/ntpath.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/nturl2path.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/nturl2path.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/nturl2path.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/nturl2path.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/numbers.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/numbers.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/numbers.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/numbers.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/opcode.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/opcode.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/opcode.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/opcode.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/operator.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/operator.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/operator.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/operator.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/optparse.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/optparse.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/optparse.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/optparse.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/os/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/os/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/os/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/os/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/os/path.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/os/path.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/os/path.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/os/path.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/ossaudiodev.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/ossaudiodev.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/ossaudiodev.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/ossaudiodev.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/parser.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/parser.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/parser.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/parser.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/pathlib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/pathlib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/pathlib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/pathlib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/pdb.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/pdb.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/pdb.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/pdb.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/pickle.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/pickle.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/pickle.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/pickle.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/pickletools.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/pickletools.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/pickletools.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/pickletools.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/pipes.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/pipes.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/pipes.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/pipes.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/pkgutil.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/pkgutil.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/pkgutil.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/pkgutil.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/platform.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/platform.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/platform.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/platform.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/plistlib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/plistlib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/plistlib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/plistlib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/poplib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/poplib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/poplib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/poplib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/posix.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/posix.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/posix.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/posix.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/posixpath.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/posixpath.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/posixpath.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/posixpath.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/pprint.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/pprint.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/pprint.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/pprint.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/profile.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/profile.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/profile.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/profile.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/pstats.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/pstats.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/pstats.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/pstats.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/pty.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/pty.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/pty.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/pty.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/pwd.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/pwd.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/pwd.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/pwd.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/py_compile.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/py_compile.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/py_compile.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/py_compile.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/pyclbr.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/pyclbr.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/pyclbr.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/pyclbr.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/pydoc.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/pydoc.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/pydoc.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/pydoc.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/pydoc_data/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/pydoc_data/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/pydoc_data/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/pydoc_data/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/pydoc_data/topics.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/pydoc_data/topics.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/pydoc_data/topics.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/pydoc_data/topics.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/pyexpat/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/pyexpat/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/pyexpat/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/pyexpat/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/pyexpat/errors.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/pyexpat/errors.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/pyexpat/errors.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/pyexpat/errors.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/pyexpat/model.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/pyexpat/model.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/pyexpat/model.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/pyexpat/model.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/queue.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/queue.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/queue.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/queue.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/quopri.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/quopri.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/quopri.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/quopri.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/random.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/random.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/random.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/random.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/re.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/re.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/re.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/re.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/readline.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/readline.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/readline.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/readline.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/reprlib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/reprlib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/reprlib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/reprlib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/resource.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/resource.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/resource.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/resource.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/rlcompleter.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/rlcompleter.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/rlcompleter.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/rlcompleter.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/runpy.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/runpy.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/runpy.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/runpy.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/sched.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/sched.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/sched.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/sched.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/secrets.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/secrets.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/secrets.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/secrets.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/select.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/select.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/select.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/select.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/selectors.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/selectors.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/selectors.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/selectors.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/shelve.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/shelve.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/shelve.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/shelve.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/shlex.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/shlex.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/shlex.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/shlex.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/shutil.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/shutil.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/shutil.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/shutil.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/signal.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/signal.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/signal.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/signal.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/site.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/site.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/site.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/site.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/smtpd.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/smtpd.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/smtpd.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/smtpd.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/smtplib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/smtplib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/smtplib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/smtplib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/sndhdr.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/sndhdr.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/sndhdr.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/sndhdr.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/socket.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/socket.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/socket.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/socket.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/socketserver.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/socketserver.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/socketserver.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/socketserver.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/spwd.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/spwd.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/spwd.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/spwd.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/sqlite3/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/sqlite3/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/sqlite3/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/sqlite3/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/sqlite3/dbapi2.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/sqlite3/dbapi2.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/sqlite3/dbapi2.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/sqlite3/dbapi2.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/sqlite3/dump.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/sqlite3/dump.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/sqlite3/dump.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/sqlite3/dump.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/sre_compile.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/sre_compile.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/sre_compile.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/sre_compile.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/sre_constants.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/sre_constants.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/sre_constants.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/sre_constants.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/sre_parse.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/sre_parse.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/sre_parse.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/sre_parse.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/ssl.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/ssl.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/ssl.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/ssl.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/stat.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/stat.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/stat.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/stat.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/statistics.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/statistics.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/statistics.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/statistics.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/string.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/string.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/string.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/string.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/stringprep.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/stringprep.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/stringprep.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/stringprep.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/struct.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/struct.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/struct.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/struct.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/subprocess.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/subprocess.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/subprocess.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/subprocess.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/sunau.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/sunau.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/sunau.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/sunau.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/symbol.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/symbol.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/symbol.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/symbol.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/symtable.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/symtable.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/symtable.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/symtable.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/sys/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/sys/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/sys/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/sys/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/sys/_monitoring.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/sys/_monitoring.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/sys/_monitoring.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/sys/_monitoring.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/sysconfig.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/sysconfig.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/sysconfig.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/sysconfig.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/syslog.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/syslog.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/syslog.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/syslog.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/tabnanny.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/tabnanny.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/tabnanny.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/tabnanny.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/tarfile.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/tarfile.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/tarfile.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/tarfile.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/telnetlib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/telnetlib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/telnetlib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/telnetlib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/tempfile.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/tempfile.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/tempfile.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/tempfile.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/termios.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/termios.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/termios.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/termios.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/textwrap.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/textwrap.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/textwrap.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/textwrap.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/this.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/this.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/this.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/this.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/threading.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/threading.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/threading.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/threading.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/time.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/time.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/time.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/time.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/timeit.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/timeit.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/timeit.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/timeit.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/tkinter/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/tkinter/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/colorchooser.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/tkinter/colorchooser.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/colorchooser.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/tkinter/colorchooser.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/commondialog.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/tkinter/commondialog.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/commondialog.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/tkinter/commondialog.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/constants.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/tkinter/constants.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/constants.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/tkinter/constants.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/dialog.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/tkinter/dialog.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/dialog.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/tkinter/dialog.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/dnd.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/tkinter/dnd.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/dnd.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/tkinter/dnd.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/filedialog.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/tkinter/filedialog.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/filedialog.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/tkinter/filedialog.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/font.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/tkinter/font.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/font.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/tkinter/font.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/messagebox.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/tkinter/messagebox.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/messagebox.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/tkinter/messagebox.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/scrolledtext.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/tkinter/scrolledtext.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/scrolledtext.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/tkinter/scrolledtext.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/simpledialog.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/tkinter/simpledialog.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/simpledialog.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/tkinter/simpledialog.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/tix.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/tkinter/tix.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/tix.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/tkinter/tix.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/ttk.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/tkinter/ttk.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/tkinter/ttk.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/tkinter/ttk.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/token.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/token.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/token.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/token.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/tokenize.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/tokenize.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/tokenize.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/tokenize.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/tomllib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/tomllib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/tomllib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/tomllib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/trace.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/trace.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/trace.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/trace.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/traceback.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/traceback.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/traceback.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/traceback.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/tracemalloc.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/tracemalloc.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/tracemalloc.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/tracemalloc.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/tty.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/tty.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/tty.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/tty.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/turtle.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/turtle.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/turtle.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/turtle.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/types.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/types.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/types.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/types.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/typing.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/typing.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/typing.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/typing.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/typing_extensions.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/typing_extensions.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/typing_extensions.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/typing_extensions.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/unicodedata.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/unicodedata.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/unicodedata.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/unicodedata.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/unittest/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/unittest/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/_log.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/unittest/_log.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/_log.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/unittest/_log.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/async_case.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/unittest/async_case.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/async_case.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/unittest/async_case.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/case.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/unittest/case.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/case.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/unittest/case.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/loader.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/unittest/loader.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/loader.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/unittest/loader.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/main.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/unittest/main.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/main.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/unittest/main.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/mock.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/unittest/mock.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/mock.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/unittest/mock.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/result.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/unittest/result.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/result.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/unittest/result.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/runner.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/unittest/runner.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/runner.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/unittest/runner.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/signals.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/unittest/signals.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/signals.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/unittest/signals.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/suite.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/unittest/suite.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/suite.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/unittest/suite.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/util.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/unittest/util.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/unittest/util.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/unittest/util.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/urllib/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/urllib/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/urllib/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/urllib/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/urllib/error.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/urllib/error.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/urllib/error.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/urllib/error.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/urllib/parse.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/urllib/parse.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/urllib/parse.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/urllib/parse.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/urllib/request.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/urllib/request.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/urllib/request.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/urllib/request.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/urllib/response.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/urllib/response.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/urllib/response.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/urllib/response.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/urllib/robotparser.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/urllib/robotparser.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/urllib/robotparser.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/urllib/robotparser.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/uu.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/uu.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/uu.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/uu.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/uuid.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/uuid.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/uuid.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/uuid.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/venv/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/venv/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/venv/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/venv/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/warnings.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/warnings.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/warnings.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/warnings.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/wave.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/wave.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/wave.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/wave.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/weakref.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/weakref.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/weakref.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/weakref.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/webbrowser.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/webbrowser.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/webbrowser.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/webbrowser.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/winreg.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/winreg.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/winreg.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/winreg.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/winsound.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/winsound.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/winsound.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/winsound.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/wsgiref/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/wsgiref/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/wsgiref/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/wsgiref/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/wsgiref/handlers.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/wsgiref/handlers.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/wsgiref/handlers.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/wsgiref/handlers.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/wsgiref/headers.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/wsgiref/headers.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/wsgiref/headers.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/wsgiref/headers.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/wsgiref/simple_server.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/wsgiref/simple_server.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/wsgiref/simple_server.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/wsgiref/simple_server.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/wsgiref/types.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/wsgiref/types.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/wsgiref/types.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/wsgiref/types.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/wsgiref/util.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/wsgiref/util.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/wsgiref/util.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/wsgiref/util.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/wsgiref/validate.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/wsgiref/validate.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/wsgiref/validate.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/wsgiref/validate.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xdrlib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xdrlib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xdrlib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xdrlib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/dom/NodeFilter.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/dom/NodeFilter.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/dom/NodeFilter.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/dom/NodeFilter.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/dom/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/dom/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/dom/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/dom/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/dom/domreg.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/dom/domreg.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/dom/domreg.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/dom/domreg.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/dom/expatbuilder.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/dom/expatbuilder.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/dom/expatbuilder.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/dom/expatbuilder.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/dom/minicompat.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/dom/minicompat.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/dom/minicompat.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/dom/minicompat.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/dom/minidom.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/dom/minidom.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/dom/minidom.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/dom/minidom.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/dom/pulldom.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/dom/pulldom.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/dom/pulldom.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/dom/pulldom.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/dom/xmlbuilder.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/dom/xmlbuilder.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/dom/xmlbuilder.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/dom/xmlbuilder.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/etree/ElementInclude.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/etree/ElementInclude.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/etree/ElementInclude.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/etree/ElementInclude.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/etree/ElementPath.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/etree/ElementPath.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/etree/ElementPath.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/etree/ElementPath.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/etree/ElementTree.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/etree/ElementTree.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/etree/ElementTree.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/etree/ElementTree.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/etree/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/etree/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/etree/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/etree/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/etree/cElementTree.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/etree/cElementTree.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/etree/cElementTree.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/etree/cElementTree.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/parsers/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/parsers/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/parsers/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/parsers/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/parsers/expat/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/parsers/expat/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/parsers/expat/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/parsers/expat/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/parsers/expat/errors.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/parsers/expat/errors.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/parsers/expat/errors.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/parsers/expat/errors.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/parsers/expat/model.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/parsers/expat/model.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/parsers/expat/model.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/parsers/expat/model.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/sax/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/sax/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/sax/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/sax/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/sax/_exceptions.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/sax/_exceptions.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/sax/_exceptions.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/sax/_exceptions.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/sax/expatreader.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/sax/expatreader.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/sax/expatreader.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/sax/expatreader.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/sax/handler.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/sax/handler.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/sax/handler.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/sax/handler.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/sax/saxutils.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/sax/saxutils.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/sax/saxutils.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/sax/saxutils.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xml/sax/xmlreader.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xml/sax/xmlreader.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xml/sax/xmlreader.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xml/sax/xmlreader.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xmlrpc/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xmlrpc/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xmlrpc/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xmlrpc/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xmlrpc/client.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xmlrpc/client.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xmlrpc/client.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xmlrpc/client.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xmlrpc/server.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xmlrpc/server.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xmlrpc/server.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xmlrpc/server.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/xxlimited.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/xxlimited.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/xxlimited.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/xxlimited.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/zipapp.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/zipapp.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/zipapp.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/zipapp.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/zipfile/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/zipfile/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/zipfile/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/zipfile/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/zipfile/_path/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/zipfile/_path/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/zipfile/_path/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/zipfile/_path/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/zipfile/_path/glob.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/zipfile/_path/glob.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/zipfile/_path/glob.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/zipfile/_path/glob.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/zipimport.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/zipimport.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/zipimport.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/zipimport.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/zlib.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/zlib.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/zlib.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/zlib.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/zoneinfo/__init__.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/zoneinfo/__init__.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/zoneinfo/__init__.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/zoneinfo/__init__.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/zoneinfo/_common.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/zoneinfo/_common.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/zoneinfo/_common.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/zoneinfo/_common.pyi diff --git a/crates/red_knot_vendored/vendor/typeshed/stdlib/zoneinfo/_tzpath.pyi b/crates/ty_vendored/vendor/typeshed/stdlib/zoneinfo/_tzpath.pyi similarity index 100% rename from crates/red_knot_vendored/vendor/typeshed/stdlib/zoneinfo/_tzpath.pyi rename to crates/ty_vendored/vendor/typeshed/stdlib/zoneinfo/_tzpath.pyi diff --git a/crates/red_knot_wasm/Cargo.toml b/crates/ty_wasm/Cargo.toml similarity index 83% rename from crates/red_knot_wasm/Cargo.toml rename to crates/ty_wasm/Cargo.toml index 14bc206629..3c96fa77e8 100644 --- a/crates/red_knot_wasm/Cargo.toml +++ b/crates/ty_wasm/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "red_knot_wasm" +name = "ty_wasm" version = "0.0.0" publish = false authors = { workspace = true } @@ -9,7 +9,7 @@ homepage = { workspace = true } documentation = { workspace = true } repository = { workspace = true } license = { workspace = true } -description = "WebAssembly bindings for Red Knot" +description = "WebAssembly bindings for ty" [lib] crate-type = ["cdylib", "rlib"] @@ -19,12 +19,12 @@ doctest = false default = ["console_error_panic_hook"] [dependencies] -red_knot_ide = { workspace = true } -red_knot_project = { workspace = true, default-features = false, features = [ +ty_ide = { workspace = true } +ty_project = { workspace = true, default-features = false, features = [ "deflate", "format" ] } -red_knot_python_semantic = { workspace = true } +ty_python_semantic = { workspace = true } ruff_db = { workspace = true, default-features = false, features = [] } ruff_notebook = { workspace = true } diff --git a/crates/red_knot_wasm/src/lib.rs b/crates/ty_wasm/src/lib.rs similarity index 98% rename from crates/red_knot_wasm/src/lib.rs rename to crates/ty_wasm/src/lib.rs index 918aaaf67a..53969603ac 100644 --- a/crates/red_knot_wasm/src/lib.rs +++ b/crates/ty_wasm/src/lib.rs @@ -1,13 +1,6 @@ use std::any::Any; use js_sys::{Error, JsString}; -use red_knot_ide::{goto_type_definition, hover, inlay_hints, MarkupKind}; -use red_knot_project::metadata::options::Options; -use red_knot_project::metadata::value::ValueSource; -use red_knot_project::watch::{ChangeEvent, ChangedKind, CreatedKind, DeletedKind}; -use red_knot_project::ProjectMetadata; -use red_knot_project::{Db, ProjectDatabase}; -use red_knot_python_semantic::Program; use ruff_db::diagnostic::{self, DisplayDiagnosticConfig}; use ruff_db::files::{system_path_to_file, File, FileRange}; use ruff_db::source::{line_index, source_text}; @@ -21,6 +14,13 @@ use ruff_notebook::Notebook; use ruff_python_formatter::formatted_file; use ruff_source_file::{LineIndex, OneIndexed, SourceLocation}; use ruff_text_size::{Ranged, TextSize}; +use ty_ide::{goto_type_definition, hover, inlay_hints, MarkupKind}; +use ty_project::metadata::options::Options; +use ty_project::metadata::value::ValueSource; +use ty_project::watch::{ChangeEvent, ChangedKind, CreatedKind, DeletedKind}; +use ty_project::ProjectMetadata; +use ty_project::{Db, ProjectDatabase}; +use ty_python_semantic::Program; use wasm_bindgen::prelude::*; #[wasm_bindgen(start)] diff --git a/crates/red_knot_wasm/tests/api.rs b/crates/ty_wasm/tests/api.rs similarity index 92% rename from crates/red_knot_wasm/tests/api.rs rename to crates/ty_wasm/tests/api.rs index 6b6802680b..e58d0871c8 100644 --- a/crates/red_knot_wasm/tests/api.rs +++ b/crates/ty_wasm/tests/api.rs @@ -1,6 +1,6 @@ #![cfg(target_arch = "wasm32")] -use red_knot_wasm::{Position, PositionEncoding, Workspace}; +use ty_wasm::{Position, PositionEncoding, Workspace}; use wasm_bindgen_test::wasm_bindgen_test; #[wasm_bindgen_test] diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index d9c16cf9de..df9c82f604 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -17,8 +17,6 @@ libfuzzer = ["libfuzzer-sys/link_libfuzzer"] cargo-fuzz = true [dependencies] -red_knot_python_semantic = { path = "../crates/red_knot_python_semantic" } -red_knot_vendored = { path = "../crates/red_knot_vendored" } ruff_db = { path = "../crates/ruff_db" } ruff_linter = { path = "../crates/ruff_linter" } ruff_python_ast = { path = "../crates/ruff_python_ast" } @@ -28,6 +26,9 @@ ruff_source_file = { path = "../crates/ruff_source_file" } ruff_python_formatter = { path = "../crates/ruff_python_formatter" } ruff_text_size = { path = "../crates/ruff_text_size" } +ty_python_semantic = { path = "../crates/ty_python_semantic" } +ty_vendored = { path = "../crates/ty_vendored" } + libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer", default-features = false } salsa = { git = "https://github.com/salsa-rs/salsa.git", rev = "42f15835c0005c4b37aaf5bc1a15e3e1b3df14b7" } similar = { version = "2.5.0" } @@ -38,8 +39,8 @@ tracing = { version = "0.1.40" } members = ["."] [[bin]] -name = "red_knot_check_invalid_syntax" -path = "fuzz_targets/red_knot_check_invalid_syntax.rs" +name = "ty_check_invalid_syntax" +path = "fuzz_targets/ty_check_invalid_syntax.rs" [[bin]] name = "ruff_parse_simple" diff --git a/fuzz/README.md b/fuzz/README.md index 5265149b8d..14f7692a89 100644 --- a/fuzz/README.md +++ b/fuzz/README.md @@ -74,9 +74,9 @@ Each fuzzer harness in [`fuzz_targets`](fuzz_targets) targets a different aspect them in different ways. While there is implementation-specific documentation in the source code itself, each harness is briefly described below. -### `red_knot_check_invalid_syntax` +### `ty_check_invalid_syntax` -This fuzz harness checks that the type checker (Red Knot) does not panic when checking a source +This fuzz harness checks that the type checker (ty) does not panic when checking a source file with invalid syntax. This rejects any corpus entries that is already valid Python code. Currently, this is limited to syntax errors that's produced by Ruff's Python parser which means that it does not cover all possible syntax errors (). diff --git a/fuzz/fuzz_targets/red_knot_check_invalid_syntax.rs b/fuzz/fuzz_targets/ty_check_invalid_syntax.rs similarity index 95% rename from fuzz/fuzz_targets/red_knot_check_invalid_syntax.rs rename to fuzz/fuzz_targets/ty_check_invalid_syntax.rs index 225bd10089..902f11ab8f 100644 --- a/fuzz/fuzz_targets/red_knot_check_invalid_syntax.rs +++ b/fuzz/fuzz_targets/ty_check_invalid_syntax.rs @@ -7,12 +7,6 @@ use std::sync::{Arc, Mutex, OnceLock}; use libfuzzer_sys::{fuzz_target, Corpus}; -use red_knot_python_semantic::lint::LintRegistry; -use red_knot_python_semantic::types::check_types; -use red_knot_python_semantic::{ - default_lint_registry, lint::RuleSelection, Db as SemanticDb, Program, ProgramSettings, - PythonPlatform, SearchPathSettings, -}; use ruff_db::files::{system_path_to_file, File, Files}; use ruff_db::system::{ DbWithTestSystem, DbWithWritableSystem as _, System, SystemPathBuf, TestSystem, @@ -21,6 +15,12 @@ use ruff_db::vendored::VendoredFileSystem; use ruff_db::{Db as SourceDb, Upcast}; use ruff_python_ast::PythonVersion; use ruff_python_parser::{parse_unchecked, Mode, ParseOptions}; +use ty_python_semantic::lint::LintRegistry; +use ty_python_semantic::types::check_types; +use ty_python_semantic::{ + default_lint_registry, lint::RuleSelection, Db as SemanticDb, Program, ProgramSettings, + PythonPlatform, SearchPathSettings, +}; /// Database that can be used for testing. /// @@ -41,7 +41,7 @@ impl TestDb { Self { storage: salsa::Storage::default(), system: TestSystem::default(), - vendored: red_knot_vendored::file_system().clone(), + vendored: ty_vendored::file_system().clone(), events: Arc::default(), files: Files::default(), rule_selection: RuleSelection::from_registry(default_lint_registry()).into(), diff --git a/fuzz/init-fuzzer.sh b/fuzz/init-fuzzer.sh index 22f81f0378..7de7087dc5 100755 --- a/fuzz/init-fuzzer.sh +++ b/fuzz/init-fuzzer.sh @@ -23,7 +23,7 @@ if [ ! -d corpus/ruff_fix_validity ]; then # Build a smaller corpus in addition to the (optional) larger corpus curl -L 'https://github.com/python/cpython/archive/refs/tags/v3.13.0.tar.gz' | tar xz - cp -r "../../../crates/red_knot_project/resources/test/corpus" "red_knot_project" + cp -r "../../../crates/ty_project/resources/test/corpus" "ty_project" cp -r "../../../crates/ruff_linter/resources/test/fixtures" "ruff_linter" cp -r "../../../crates/ruff_python_formatter/resources/test/fixtures" "ruff_python_formatter" cp -r "../../../crates/ruff_python_parser/resources" "ruff_python_parser" diff --git a/playground/.prettierignore b/playground/.prettierignore index ac9e43b7a3..8c7763fecf 100644 --- a/playground/.prettierignore +++ b/playground/.prettierignore @@ -1,5 +1,5 @@ **.md ruff/dist ruff/ruff_wasm -knot/dist -knot/red_knot_wasm \ No newline at end of file +ty/dist +ty/ty_wasm \ No newline at end of file diff --git a/playground/README.md b/playground/README.md index efe28b7557..22ba019a2d 100644 --- a/playground/README.md +++ b/playground/README.md @@ -5,8 +5,8 @@ In-browser playground for Ruff. Available [https://play.ruff.rs/](https://play.r ## Getting started Install the NPM dependencies with `npm install`, and run, and run the development server with -`npm start --workspace ruff-playground` or `npm start --workspace knot-playground`. -You may need to restart the server after making changes to Ruff or Red Knot to re-build the WASM +`npm start --workspace ruff-playground` or `npm start --workspace ty-playground`. +You may need to restart the server after making changes to Ruff or ty to re-build the WASM module. To run the datastore, which is based @@ -37,4 +37,4 @@ additional inspiration from the [Biome Playground](https://biomejs.dev/playgroun ### Stack overflows If you see stack overflows in the playground, build the WASM module in release mode: -`npm run --workspace knot-playground build:wasm`. +`npm run --workspace ty-playground build:wasm`. diff --git a/playground/package-lock.json b/playground/package-lock.json index 61791af3fd..7d1e4579aa 100644 --- a/playground/package-lock.json +++ b/playground/package-lock.json @@ -8,7 +8,7 @@ "name": "playground", "version": "0.0.0", "workspaces": [ - "knot", + "ty", "ruff", "shared" ], @@ -30,9 +30,10 @@ "wasm-pack": "^0.13.1" } }, - "knot": { - "name": "knot-playground", + "ty": { + "name": "ty-playground", "version": "0.0.0", + "extraneous": true, "dependencies": { "@monaco-editor/react": "^4.7.0", "classnames": "^2.5.1", @@ -42,7 +43,7 @@ "react": "^19.0.0", "react-dom": "^19.0.0", "react-resizable-panels": "^2.1.7", - "red_knot_wasm": "file:red_knot_wasm", + "ty_wasm": "file:ty_wasm", "shared": "0.0.0", "smol-toml": "^1.3.1" }, @@ -50,8 +51,9 @@ "vite-plugin-static-copy": "^2.3.0" } }, - "knot/red_knot_wasm": { + "ty/ty_wasm": { "version": "0.0.0", + "extraneous": true, "license": "MIT" }, "node_modules/@esbuild/aix-ppc64": { @@ -4078,10 +4080,6 @@ "json-buffer": "3.0.1" } }, - "node_modules/knot-playground": { - "resolved": "knot", - "link": true - }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -4991,10 +4989,6 @@ "node": ">=8.10.0" } }, - "node_modules/red_knot_wasm": { - "resolved": "knot/red_knot_wasm", - "link": true - }, "node_modules/reflect.getprototypeof": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", @@ -5641,6 +5635,14 @@ "strip-bom": "^3.0.0" } }, + "node_modules/ty_wasm": { + "resolved": "ty/ty_wasm", + "link": true + }, + "node_modules/ty-playground": { + "resolved": "ty", + "link": true + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -5881,9 +5883,9 @@ } }, "node_modules/vite-plugin-static-copy": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/vite-plugin-static-copy/-/vite-plugin-static-copy-2.3.0.tgz", - "integrity": "sha512-LLKwhhHetGaCnWz4mas4qqjjguDka6/6b4+SeIohRroj8aCE7QTfiZECfPecslFQkWZ3HdQuq5kOPmWZjNYlKA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/vite-plugin-static-copy/-/vite-plugin-static-copy-2.3.1.tgz", + "integrity": "sha512-EfsPcBm3ewg3UMG8RJaC0ADq6/qnUZnokXx4By4+2cAcipjT9i0Y0owIJGqmZI7d6nxk4qB1q5aXOwNuSyPdyA==", "dev": true, "license": "MIT", "dependencies": { @@ -6037,9 +6039,9 @@ "license": "ISC" }, "node_modules/ws": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz", - "integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==", + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz", + "integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==", "license": "MIT", "engines": { "node": ">=10.0.0" @@ -6094,7 +6096,7 @@ } }, "ruff/ruff_wasm": { - "version": "0.11.4", + "version": "0.11.8", "license": "MIT" }, "shared": { @@ -6105,6 +6107,31 @@ "react": "^19.0.0", "react-resizable-panels": "^2.1.7" } + }, + "ty": { + "name": "ty-playground", + "version": "0.0.0", + "dependencies": { + "@monaco-editor/react": "^4.7.0", + "classnames": "^2.5.1", + "lz-string": "^1.5.0", + "monaco-editor": "^0.52.2", + "pyodide": "^0.27.4", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "react-resizable-panels": "^2.1.7", + "shared": "0.0.0", + "smol-toml": "^1.3.1", + "ty_wasm": "file:ty_wasm" + }, + "devDependencies": { + "vite-plugin-static-copy": "^2.3.0" + } + }, + "ty/ty_wasm": { + "name": "ty_wasm", + "version": "0.0.0", + "license": "MIT" } } } diff --git a/playground/package.json b/playground/package.json index 82a74c906c..9a3255ad9c 100644 --- a/playground/package.json +++ b/playground/package.json @@ -5,15 +5,15 @@ "type": "module", "scripts": { "check": "npm run dev:wasm && npm run lint && npm run tsc", - "dev:wasm": "npm run dev:wasm --workspace knot-playground && npm run dev:wasm --workspace ruff-playground", - "dev:build": "npm run dev:build --workspace knot-playground && npm run dev:build --workspace ruff-playground", + "dev:wasm": "npm run dev:wasm --workspace ty-playground && npm run dev:wasm --workspace ruff-playground", + "dev:build": "npm run dev:build --workspace ty-playground && npm run dev:build --workspace ruff-playground", "fmt": "prettier --cache -w .", "fmt:check": "prettier --cache --check .", - "lint": "eslint --cache --ext .ts,.tsx ruff/src knot/src", + "lint": "eslint --cache --ext .ts,.tsx ruff/src ty/src", "tsc": "tsc" }, "workspaces": [ - "knot", + "ty", "ruff", "shared" ], diff --git a/playground/tsconfig.json b/playground/tsconfig.json index d539e17861..408d95de6a 100644 --- a/playground/tsconfig.json +++ b/playground/tsconfig.json @@ -16,6 +16,10 @@ "noEmit": true, "jsx": "react-jsx" }, - "include": ["ruff/src", "knot/src"], - "references": [{ "path": "./tsconfig.node.json" }] + "include": ["ruff/src", "ty/src"], + "references": [ + { + "path": "./tsconfig.node.json" + } + ] } diff --git a/playground/tsconfig.node.json b/playground/tsconfig.node.json index c4f5d4847b..56ea1c6b37 100644 --- a/playground/tsconfig.node.json +++ b/playground/tsconfig.node.json @@ -5,5 +5,5 @@ "moduleResolution": "Node", "allowSyntheticDefaultImports": true }, - "include": ["ruff/vite.config.ts", "knot/vite.config.ts"] + "include": ["ruff/vite.config.ts", "ty/vite.config.ts"] } diff --git a/playground/knot/index.html b/playground/ty/index.html similarity index 80% rename from playground/knot/index.html rename to playground/ty/index.html index 368ba81eb4..cd3fc70d91 100644 --- a/playground/knot/index.html +++ b/playground/ty/index.html @@ -9,18 +9,18 @@ - Playground | Red Knot + Playground | ty - + diff --git a/playground/knot/package.json b/playground/ty/package.json similarity index 69% rename from playground/knot/package.json rename to playground/ty/package.json index 1e0001187d..a153371f02 100644 --- a/playground/knot/package.json +++ b/playground/ty/package.json @@ -1,13 +1,13 @@ { - "name": "knot-playground", + "name": "ty-playground", "private": true, "version": "0.0.0", "type": "module", "scripts": { "prebuild": "npm run build:wasm", "build": "vite build", - "build:wasm": "wasm-pack build ../../crates/red_knot_wasm --target web --out-dir ../../playground/knot/red_knot_wasm", - "dev:wasm": "wasm-pack build ../../crates/red_knot_wasm --dev --target web --out-dir ../../playground/knot/red_knot_wasm", + "build:wasm": "wasm-pack build ../../crates/ty_wasm --target web --out-dir ../../playground/ty/ty_wasm", + "dev:wasm": "wasm-pack build ../../crates/ty_wasm --dev --target web --out-dir ../../playground/ty/ty_wasm", "predev:build": "npm run dev:wasm", "dev:build": "vite build", "prestart": "npm run dev:wasm", @@ -23,9 +23,9 @@ "react": "^19.0.0", "react-dom": "^19.0.0", "react-resizable-panels": "^2.1.7", - "red_knot_wasm": "file:red_knot_wasm", "shared": "0.0.0", - "smol-toml": "^1.3.1" + "smol-toml": "^1.3.1", + "ty_wasm": "file:ty_wasm" }, "overrides": { "@monaco-editor/react": { diff --git a/playground/knot/public/Astral.png b/playground/ty/public/Astral.png similarity index 100% rename from playground/knot/public/Astral.png rename to playground/ty/public/Astral.png diff --git a/playground/knot/public/apple-touch-icon.png b/playground/ty/public/apple-touch-icon.png similarity index 100% rename from playground/knot/public/apple-touch-icon.png rename to playground/ty/public/apple-touch-icon.png diff --git a/playground/knot/public/favicon-16x16.png b/playground/ty/public/favicon-16x16.png similarity index 100% rename from playground/knot/public/favicon-16x16.png rename to playground/ty/public/favicon-16x16.png diff --git a/playground/knot/public/favicon-32x32.png b/playground/ty/public/favicon-32x32.png similarity index 100% rename from playground/knot/public/favicon-32x32.png rename to playground/ty/public/favicon-32x32.png diff --git a/playground/knot/public/favicon.ico b/playground/ty/public/favicon.ico similarity index 100% rename from playground/knot/public/favicon.ico rename to playground/ty/public/favicon.ico diff --git a/playground/knot/src/Editor/Chrome.tsx b/playground/ty/src/Editor/Chrome.tsx similarity index 99% rename from playground/knot/src/Editor/Chrome.tsx rename to playground/ty/src/Editor/Chrome.tsx index 4e055015d6..334f47a282 100644 --- a/playground/knot/src/Editor/Chrome.tsx +++ b/playground/ty/src/Editor/Chrome.tsx @@ -13,7 +13,7 @@ import { Theme, VerticalResizeHandle, } from "shared"; -import type { Workspace } from "red_knot_wasm"; +import type { Workspace } from "ty_wasm"; import { Panel, PanelGroup } from "react-resizable-panels"; import { Files, isPythonFile } from "./Files"; import SecondarySideBar from "./SecondarySideBar"; diff --git a/playground/knot/src/Editor/Diagnostics.tsx b/playground/ty/src/Editor/Diagnostics.tsx similarity index 97% rename from playground/knot/src/Editor/Diagnostics.tsx rename to playground/ty/src/Editor/Diagnostics.tsx index a8616c9bb0..c1a395d2a1 100644 --- a/playground/knot/src/Editor/Diagnostics.tsx +++ b/playground/ty/src/Editor/Diagnostics.tsx @@ -1,4 +1,4 @@ -import type { Severity, Range, TextRange } from "red_knot_wasm"; +import type { Severity, Range, TextRange } from "ty_wasm"; import classNames from "classnames"; import { Theme } from "shared"; import { useMemo } from "react"; diff --git a/playground/knot/src/Editor/Editor.tsx b/playground/ty/src/Editor/Editor.tsx similarity index 93% rename from playground/knot/src/Editor/Editor.tsx rename to playground/ty/src/Editor/Editor.tsx index 73d8f7527b..7936ce5ac8 100644 --- a/playground/knot/src/Editor/Editor.tsx +++ b/playground/ty/src/Editor/Editor.tsx @@ -18,11 +18,11 @@ import { import { useCallback, useEffect, useRef } from "react"; import { Theme } from "shared"; import { - Range as KnotRange, + Range as TyRange, Severity, type Workspace, - Position as KnotPosition, -} from "red_knot_wasm"; + Position as TyPosition, +} from "ty_wasm"; import IStandaloneCodeEditor = editor.IStandaloneCodeEditor; import { FileId, ReadonlyFiles } from "../Playground"; @@ -194,7 +194,7 @@ class PlaygroundServer const inlayHints = workspace.inlayHints( selectedHandle, - iRangeToKnotRange(range), + MonacoRangeToTyRange(range), ); if (inlayHints.length === 0) { @@ -300,7 +300,7 @@ class PlaygroundServer const hover = workspace.hover( selectedHandle, - new KnotPosition(position.lineNumber, position.column), + new TyPosition(position.lineNumber, position.column), ); if (hover == null) { @@ -308,7 +308,7 @@ class PlaygroundServer } return { - range: knotRangeToIRange(hover.range), + range: tyRangeToMonacoRange(hover.range), contents: [{ value: hover.markdown, isTrusted: true }], }; } @@ -334,7 +334,7 @@ class PlaygroundServer const links = workspace.gotoTypeDefinition( selectedHandle, - new KnotPosition(position.lineNumber, position.column), + new TyPosition(position.lineNumber, position.column), ); return ( @@ -343,16 +343,16 @@ class PlaygroundServer const targetSelection = link.selection_range == null ? undefined - : knotRangeToIRange(link.selection_range); + : tyRangeToMonacoRange(link.selection_range); const originSelection = link.origin_selection_range == null ? undefined - : knotRangeToIRange(link.origin_selection_range); + : tyRangeToMonacoRange(link.origin_selection_range); return { uri: Uri.parse(link.path), - range: knotRangeToIRange(link.full_range), + range: tyRangeToMonacoRange(link.full_range), targetSelectionRange: targetSelection, originSelectionRange: originSelection, } as languages.LocationLink; @@ -450,7 +450,7 @@ class PlaygroundServer } } -function knotRangeToIRange(range: KnotRange): IRange { +function tyRangeToMonacoRange(range: TyRange): IRange { return { startLineNumber: range.start.line, startColumn: range.start.column, @@ -459,9 +459,9 @@ function knotRangeToIRange(range: KnotRange): IRange { }; } -function iRangeToKnotRange(range: IRange): KnotRange { - return new KnotRange( - new KnotPosition(range.startLineNumber, range.startColumn), - new KnotPosition(range.endLineNumber, range.endColumn), +function MonacoRangeToTyRange(range: IRange): TyRange { + return new TyRange( + new TyPosition(range.startLineNumber, range.startColumn), + new TyPosition(range.endLineNumber, range.endColumn), ); } diff --git a/playground/knot/src/Editor/Files.tsx b/playground/ty/src/Editor/Files.tsx similarity index 99% rename from playground/knot/src/Editor/Files.tsx rename to playground/ty/src/Editor/Files.tsx index 215baa2476..d345754901 100644 --- a/playground/knot/src/Editor/Files.tsx +++ b/playground/ty/src/Editor/Files.tsx @@ -2,7 +2,7 @@ import { Icons, Theme } from "shared"; import classNames from "classnames"; import { useState } from "react"; import { FileId } from "../Playground"; -import { type FileHandle } from "red_knot_wasm"; +import { type FileHandle } from "ty_wasm"; export interface Props { // The file names diff --git a/playground/knot/src/Editor/SecondaryPanel.tsx b/playground/ty/src/Editor/SecondaryPanel.tsx similarity index 100% rename from playground/knot/src/Editor/SecondaryPanel.tsx rename to playground/ty/src/Editor/SecondaryPanel.tsx diff --git a/playground/knot/src/Editor/SecondarySideBar.tsx b/playground/ty/src/Editor/SecondarySideBar.tsx similarity index 100% rename from playground/knot/src/Editor/SecondarySideBar.tsx rename to playground/ty/src/Editor/SecondarySideBar.tsx diff --git a/playground/knot/src/Editor/api.ts b/playground/ty/src/Editor/api.ts similarity index 100% rename from playground/knot/src/Editor/api.ts rename to playground/ty/src/Editor/api.ts diff --git a/playground/knot/src/Editor/persist.ts b/playground/ty/src/Editor/persist.ts similarity index 100% rename from playground/knot/src/Editor/persist.ts rename to playground/ty/src/Editor/persist.ts diff --git a/playground/knot/src/Playground.tsx b/playground/ty/src/Playground.tsx similarity index 93% rename from playground/knot/src/Playground.tsx rename to playground/ty/src/Playground.tsx index 971d5f9eac..c6a171f623 100644 --- a/playground/knot/src/Playground.tsx +++ b/playground/ty/src/Playground.tsx @@ -10,13 +10,13 @@ import { useState, } from "react"; import { ErrorMessage, Header, setupMonaco, useTheme } from "shared"; -import { FileHandle, PositionEncoding, Workspace } from "red_knot_wasm"; +import { FileHandle, PositionEncoding, Workspace } from "ty_wasm"; import { persist, persistLocal, restore } from "./Editor/persist"; import { loader } from "@monaco-editor/react"; -import knotSchema from "../../../knot.schema.json"; +import tySchema from "../../../ty.schema.json"; import Chrome, { formatError } from "./Editor/Chrome"; -export const SETTINGS_FILE_NAME = "knot.json"; +export const SETTINGS_FILE_NAME = "ty.json"; export default function Playground() { const [theme, setTheme] = useTheme(); @@ -224,13 +224,13 @@ def with_style(line, word, style): output += "-" * len(word) -print(with_style("Red Knot is a fast type checker for Python.", "fast", "underlined")) +print(with_style("ty is a fast type checker for Python.", "fast", "underlined")) `; const DEFAULT_WORKSPACE = { files: { "main.py": DEFAULT_PROGRAM, - "knot.json": DEFAULT_SETTINGS, + "ty.json": DEFAULT_SETTINGS, }, current: "main.py", }; @@ -268,7 +268,7 @@ interface FilesState { * The database file handles by file id. * * Files without a file handle are well-known files that are only handled by the - * playground (e.g. knot.json) + * playground (e.g. ty.json) */ handles: Readonly<{ [id: FileId]: FileHandle | null }>; @@ -451,14 +451,14 @@ export interface InitializedPlayground { // Run once during startup. Initializes monaco, loads the wasm file, and restores the previous editor state. async function startPlayground(): Promise { - const red_knot = await import("../red_knot_wasm"); - await red_knot.default(); + const ty = await import("../ty_wasm"); + await ty.default(); const monaco = await loader.init(); setupMonaco(monaco, { - uri: "https://raw.githubusercontent.com/astral-sh/ruff/main/knot.schema.json", - fileMatch: ["knot.json"], - schema: knotSchema, + uri: "https://raw.githubusercontent.com/astral-sh/ruff/main/ty.schema.json", + fileMatch: ["ty.json"], + schema: tySchema, }); const restored = await restore(); @@ -483,7 +483,7 @@ function updateOptions( workspace?.updateOptions(settings); setError(null); } catch (error) { - setError(`Failed to update 'knot.json' options: ${formatError(error)}`); + setError(`Failed to update 'ty.json' options: ${formatError(error)}`); } } @@ -520,8 +520,17 @@ function restoreWorkspace( ) { let hasSettings = false; - for (const [name, content] of Object.entries(state.files)) { + // eslint-disable-next-line prefer-const + for (let [name, content] of Object.entries(state.files)) { let handle = null; + + if ( + name === "knot.json" && + !Object.keys(state.files).includes(SETTINGS_FILE_NAME) + ) { + name = SETTINGS_FILE_NAME; + } + if (name === SETTINGS_FILE_NAME) { updateOptions(workspace, content, setError); hasSettings = true; @@ -536,8 +545,11 @@ function restoreWorkspace( updateOptions(workspace, null, setError); } + const selected = + state.current === "knot.json" ? SETTINGS_FILE_NAME : state.current; + dispatchFiles({ type: "selectFileByName", - name: state.current, + name: selected, }); } diff --git a/playground/knot/src/index.css b/playground/ty/src/index.css similarity index 100% rename from playground/knot/src/index.css rename to playground/ty/src/index.css diff --git a/playground/knot/src/main.tsx b/playground/ty/src/main.tsx similarity index 100% rename from playground/knot/src/main.tsx rename to playground/ty/src/main.tsx diff --git a/playground/knot/src/third-party.d.ts b/playground/ty/src/third-party.d.ts similarity index 100% rename from playground/knot/src/third-party.d.ts rename to playground/ty/src/third-party.d.ts diff --git a/playground/knot/src/vite-env.d.ts b/playground/ty/src/vite-env.d.ts similarity index 100% rename from playground/knot/src/vite-env.d.ts rename to playground/ty/src/vite-env.d.ts diff --git a/playground/knot/vite.config.ts b/playground/ty/vite.config.ts similarity index 100% rename from playground/knot/vite.config.ts rename to playground/ty/vite.config.ts diff --git a/pyproject.toml b/pyproject.toml index a76aa55704..cf19e1306b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ include = [ [tool.ruff] target-version = "py38" extend-exclude = [ - "crates/red_knot_vendored/vendor/", + "crates/ty_vendored/vendor/", "crates/ruff/resources/", "crates/ruff_linter/resources/", "crates/ruff_python_formatter/resources/", @@ -99,7 +99,7 @@ required-imports = ["from __future__ import annotations"] [tool.black] force-exclude = ''' /( - | crates/red_knot_vendored/vendor + | crates/ty_vendored/vendor | crates/ruff_linter/resources | crates/ruff_python_formatter/resources | crates/ruff_python_parser/resources diff --git a/python/py-fuzzer/fuzz.py b/python/py-fuzzer/fuzz.py index ff084e38ab..4e6881dd84 100644 --- a/python/py-fuzzer/fuzz.py +++ b/python/py-fuzzer/fuzz.py @@ -48,13 +48,13 @@ Seed = NewType("Seed", int) ExitCode = NewType("ExitCode", int) -def redknot_contains_bug(code: str, *, red_knot_executable: Path) -> bool: +def ty_contains_bug(code: str, *, ty_executable: Path) -> bool: """Return `True` if the code triggers a panic in type-checking code.""" with tempfile.TemporaryDirectory() as tempdir: input_file = Path(tempdir, "input.py") input_file.write_text(code) completed_process = subprocess.run( - [red_knot_executable, "check", input_file], capture_output=True, text=True + [ty_executable, "check", input_file], capture_output=True, text=True ) return completed_process.returncode not in {0, 1, 2} @@ -85,8 +85,8 @@ def contains_bug(code: str, *, executable: Executable, executable_path: Path) -> match executable: case Executable.RUFF: return ruff_contains_bug(code, ruff_executable=executable_path) - case Executable.RED_KNOT: - return redknot_contains_bug(code, red_knot_executable=executable_path) + case Executable.TY: + return ty_contains_bug(code, ty_executable=executable_path) case _ as unreachable: assert_never(unreachable) @@ -139,10 +139,8 @@ class FuzzResult: match self.executable: case Executable.RUFF: panic_message = f"The following code triggers a {new}parser bug:" - case Executable.RED_KNOT: - panic_message = ( - f"The following code triggers a {new}red-knot panic:" - ) + case Executable.TY: + panic_message = f"The following code triggers a {new}ty panic:" case _ as unreachable: assert_never(unreachable) @@ -292,7 +290,7 @@ def parse_seed_argument(arg: str) -> int | range: class Executable(enum.StrEnum): RUFF = "ruff" - RED_KNOT = "red_knot" + TY = "ty" @dataclass(slots=True) diff --git a/scripts/knot_benchmark/README.md b/scripts/ty_benchmark/README.md similarity index 72% rename from scripts/knot_benchmark/README.md rename to scripts/ty_benchmark/README.md index 622d6da747..e55150d4f1 100644 --- a/scripts/knot_benchmark/README.md +++ b/scripts/ty_benchmark/README.md @@ -5,15 +5,15 @@ - Unix: `curl -LsSf https://astral.sh/uv/install.sh | sh` - Windows: `powershell -c "irm https://astral.sh/uv/install.ps1 | iex"` -1. Build red_knot: `cargo build --bin red_knot --release` -1. `cd` into the benchmark directory: `cd scripts/knot_benchmark` +1. Build ty: `cargo build --bin ty --release` +1. `cd` into the benchmark directory: `cd scripts/ty_benchmark` 1. Run benchmarks: `uv run benchmark` ## Known limitations -Red Knot only implements a tiny fraction of Mypy's and Pyright's functionality, +ty only implements a tiny fraction of Mypy's and Pyright's functionality, so the benchmarks aren't in any way a fair comparison today. However, -they'll become more meaningful as we build out more type checking features in Red Knot. +they'll become more meaningful as we build out more type checking features in ty. ### Windows support diff --git a/scripts/knot_benchmark/pyproject.toml b/scripts/ty_benchmark/pyproject.toml similarity index 79% rename from scripts/knot_benchmark/pyproject.toml rename to scripts/ty_benchmark/pyproject.toml index e1c5191232..99040466fb 100644 --- a/scripts/knot_benchmark/pyproject.toml +++ b/scripts/ty_benchmark/pyproject.toml @@ -1,7 +1,7 @@ [project] -name = "knot_benchmark" +name = "ty_benchmark" version = "0.0.1" -description = "Package for running end-to-end Red Knot benchmarks" +description = "Package for running end-to-end ty benchmarks" requires-python = ">=3.12" dependencies = ["mypy", "pyright"] diff --git a/scripts/knot_benchmark/src/benchmark/__init__.py b/scripts/ty_benchmark/src/benchmark/__init__.py similarity index 100% rename from scripts/knot_benchmark/src/benchmark/__init__.py rename to scripts/ty_benchmark/src/benchmark/__init__.py diff --git a/scripts/knot_benchmark/src/benchmark/cases.py b/scripts/ty_benchmark/src/benchmark/cases.py similarity index 95% rename from scripts/knot_benchmark/src/benchmark/cases.py rename to scripts/ty_benchmark/src/benchmark/cases.py index c95350dba5..786b4b373f 100644 --- a/scripts/knot_benchmark/src/benchmark/cases.py +++ b/scripts/ty_benchmark/src/benchmark/cases.py @@ -53,18 +53,18 @@ class Tool(abc.ABC): return None -class Knot(Tool): +class Ty(Tool): path: Path name: str def __init__(self, *, path: Path | None = None): - self.name = str(path) or "knot" + self.name = str(path) or "ty" self.path = path or ( - (Path(__file__) / "../../../../../target/release/red_knot").resolve() + (Path(__file__) / "../../../../../target/release/ty").resolve() ) assert self.path.is_file(), ( - f"Red Knot not found at '{self.path}'. Run `cargo build --release --bin red_knot`." + f"ty not found at '{self.path}'. Run `cargo build --release --bin ty`." ) def cold_command(self, project: Project, venv: Venv) -> Command: @@ -73,7 +73,7 @@ class Knot(Tool): command.extend(["--python", str(venv.path)]) return Command( - name="knot", + name="ty", command=command, ) diff --git a/scripts/knot_benchmark/src/benchmark/projects.py b/scripts/ty_benchmark/src/benchmark/projects.py similarity index 100% rename from scripts/knot_benchmark/src/benchmark/projects.py rename to scripts/ty_benchmark/src/benchmark/projects.py diff --git a/scripts/knot_benchmark/src/benchmark/run.py b/scripts/ty_benchmark/src/benchmark/run.py similarity index 88% rename from scripts/knot_benchmark/src/benchmark/run.py rename to scripts/ty_benchmark/src/benchmark/run.py index eab1449651..2e8d0cdcfd 100644 --- a/scripts/knot_benchmark/src/benchmark/run.py +++ b/scripts/ty_benchmark/src/benchmark/run.py @@ -8,7 +8,7 @@ import typing from pathlib import Path from benchmark import Hyperfine -from benchmark.cases import Benchmark, Knot, Mypy, Pyright, Tool, Venv +from benchmark.cases import Benchmark, Mypy, Pyright, Tool, Ty, Venv from benchmark.projects import ALL as all_projects from benchmark.projects import DEFAULT as default_projects @@ -19,7 +19,7 @@ if typing.TYPE_CHECKING: def main() -> None: """Run the benchmark.""" parser = argparse.ArgumentParser( - description="Benchmark knot against other packaging tools." + description="Benchmark ty against other packaging tools." ) parser.add_argument( "--verbose", "-v", action="store_true", help="Print verbose output." @@ -63,14 +63,14 @@ def main() -> None: action="store_true", ) parser.add_argument( - "--knot", - help="Whether to benchmark knot (assumes a red_knot binary exists at `./target/release/red_knot`).", + "--ty", + help="Whether to benchmark ty (assumes a ty binary exists at `./target/release/ty`).", action="store_true", ) parser.add_argument( - "--knot-path", + "--ty-path", type=Path, - help="Path(s) to the red_knot binary to benchmark.", + help="Path(s) to the ty binary to benchmark.", action="append", ) @@ -90,17 +90,17 @@ def main() -> None: if args.pyright: suites.append(Pyright()) - if args.knot: - suites.append(Knot()) + if args.ty: + suites.append(Ty()) - for path in args.knot_path or []: - suites.append(Knot(path=path)) + for path in args.ty_path or []: + suites.append(Ty(path=path)) if args.mypy: suites.append(Mypy()) # If no tools were specified, default to benchmarking all tools. - suites = suites or [Knot(), Pyright(), Mypy()] + suites = suites or [Ty(), Pyright(), Mypy()] # Determine the benchmarks to run, based on user input. benchmarks = ( diff --git a/scripts/knot_benchmark/uv.lock b/scripts/ty_benchmark/uv.lock similarity index 76% rename from scripts/knot_benchmark/uv.lock rename to scripts/ty_benchmark/uv.lock index 0fcb11197a..1091d51dd9 100644 --- a/scripts/knot_benchmark/uv.lock +++ b/scripts/ty_benchmark/uv.lock @@ -1,8 +1,57 @@ version = 1 +revision = 2 requires-python = ">=3.12" [[package]] -name = "knot-benchmark" +name = "mypy" +version = "1.11.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mypy-extensions" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b6/9c/a4b3bda53823439cf395db8ecdda6229a83f9bf201714a68a15190bb2919/mypy-1.11.1.tar.gz", hash = "sha256:f404a0b069709f18bbdb702eb3dcfe51910602995de00bd39cea3050b5772d08", size = 3078369, upload_time = "2024-07-30T22:38:50.835Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3a/34/69638cee2e87303f19a0c35e80d42757e14d9aba328f272fdcdc0bf3c9b8/mypy-1.11.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f39918a50f74dc5969807dcfaecafa804fa7f90c9d60506835036cc1bc891dc8", size = 10995789, upload_time = "2024-07-30T22:37:57.824Z" }, + { url = "https://files.pythonhosted.org/packages/c4/3c/3e0611348fc53a4a7c80485959478b4f6eae706baf3b7c03cafa22639216/mypy-1.11.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0bc71d1fb27a428139dd78621953effe0d208aed9857cb08d002280b0422003a", size = 10002696, upload_time = "2024-07-30T22:38:08.325Z" }, + { url = "https://files.pythonhosted.org/packages/1c/21/a6b46c91b4c9d1918ee59c305f46850cde7cbea748635a352e7c3c8ed204/mypy-1.11.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b868d3bcff720dd7217c383474008ddabaf048fad8d78ed948bb4b624870a417", size = 12505772, upload_time = "2024-07-30T22:37:23.589Z" }, + { url = "https://files.pythonhosted.org/packages/c4/55/07904d4c8f408e70308015edcbff067eaa77514475938a9dd81b063de2a8/mypy-1.11.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a707ec1527ffcdd1c784d0924bf5cb15cd7f22683b919668a04d2b9c34549d2e", size = 12954190, upload_time = "2024-07-30T22:37:31.244Z" }, + { url = "https://files.pythonhosted.org/packages/1e/b7/3a50f318979c8c541428c2f1ee973cda813bcc89614de982dafdd0df2b3e/mypy-1.11.1-cp312-cp312-win_amd64.whl", hash = "sha256:64f4a90e3ea07f590c5bcf9029035cf0efeae5ba8be511a8caada1a4893f5525", size = 9663138, upload_time = "2024-07-30T22:37:19.849Z" }, + { url = "https://files.pythonhosted.org/packages/f8/d4/4960d0df55f30a7625d9c3c9414dfd42f779caabae137ef73ffaed0c97b9/mypy-1.11.1-py3-none-any.whl", hash = "sha256:0624bdb940255d2dd24e829d99a13cfeb72e4e9031f9492148f410ed30bcab54", size = 2619257, upload_time = "2024-07-30T22:37:40.567Z" }, +] + +[[package]] +name = "mypy-extensions" +version = "1.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/98/a4/1ab47638b92648243faf97a5aeb6ea83059cc3624972ab6b8d2316078d3f/mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782", size = 4433, upload_time = "2023-02-04T12:11:27.157Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2a/e2/5d3f6ada4297caebe1a2add3b126fe800c96f56dbe5d1988a2cbe0b267aa/mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d", size = 4695, upload_time = "2023-02-04T12:11:25.002Z" }, +] + +[[package]] +name = "nodeenv" +version = "1.9.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/43/16/fc88b08840de0e0a72a2f9d8c6bae36be573e475a6326ae854bcc549fc45/nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f", size = 47437, upload_time = "2024-06-04T18:44:11.171Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d2/1d/1b658dbd2b9fa9c4c9f32accbfc0205d532c8c6194dc0f2a4c0428e7128a/nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9", size = 22314, upload_time = "2024-06-04T18:44:08.352Z" }, +] + +[[package]] +name = "pyright" +version = "1.1.377" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "nodeenv" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/49/f0/25b0db363d6888164adb7c828b877bbf2c30936955fb9513922ae03e70e4/pyright-1.1.377.tar.gz", hash = "sha256:aabc30fedce0ded34baa0c49b24f10e68f4bfc8f68ae7f3d175c4b0f256b4fcf", size = 17484, upload_time = "2024-08-21T02:25:15.74Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/34/c9/89c40c4de44fe9463e77dddd0c4e2d2dd7a93e8ddc6858dfe7d5f75d263d/pyright-1.1.377-py3-none-any.whl", hash = "sha256:af0dd2b6b636c383a6569a083f8c5a8748ae4dcde5df7914b3f3f267e14dd162", size = 18223, upload_time = "2024-08-21T02:25:14.585Z" }, +] + +[[package]] +name = "ty-benchmark" version = "0.0.1" source = { editable = "." } dependencies = [ @@ -16,59 +65,11 @@ requires-dist = [ { name = "pyright" }, ] -[[package]] -name = "mypy" -version = "1.11.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "mypy-extensions" }, - { name = "typing-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/b6/9c/a4b3bda53823439cf395db8ecdda6229a83f9bf201714a68a15190bb2919/mypy-1.11.1.tar.gz", hash = "sha256:f404a0b069709f18bbdb702eb3dcfe51910602995de00bd39cea3050b5772d08", size = 3078369 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/3a/34/69638cee2e87303f19a0c35e80d42757e14d9aba328f272fdcdc0bf3c9b8/mypy-1.11.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f39918a50f74dc5969807dcfaecafa804fa7f90c9d60506835036cc1bc891dc8", size = 10995789 }, - { url = "https://files.pythonhosted.org/packages/c4/3c/3e0611348fc53a4a7c80485959478b4f6eae706baf3b7c03cafa22639216/mypy-1.11.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0bc71d1fb27a428139dd78621953effe0d208aed9857cb08d002280b0422003a", size = 10002696 }, - { url = "https://files.pythonhosted.org/packages/1c/21/a6b46c91b4c9d1918ee59c305f46850cde7cbea748635a352e7c3c8ed204/mypy-1.11.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b868d3bcff720dd7217c383474008ddabaf048fad8d78ed948bb4b624870a417", size = 12505772 }, - { url = "https://files.pythonhosted.org/packages/c4/55/07904d4c8f408e70308015edcbff067eaa77514475938a9dd81b063de2a8/mypy-1.11.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a707ec1527ffcdd1c784d0924bf5cb15cd7f22683b919668a04d2b9c34549d2e", size = 12954190 }, - { url = "https://files.pythonhosted.org/packages/1e/b7/3a50f318979c8c541428c2f1ee973cda813bcc89614de982dafdd0df2b3e/mypy-1.11.1-cp312-cp312-win_amd64.whl", hash = "sha256:64f4a90e3ea07f590c5bcf9029035cf0efeae5ba8be511a8caada1a4893f5525", size = 9663138 }, - { url = "https://files.pythonhosted.org/packages/f8/d4/4960d0df55f30a7625d9c3c9414dfd42f779caabae137ef73ffaed0c97b9/mypy-1.11.1-py3-none-any.whl", hash = "sha256:0624bdb940255d2dd24e829d99a13cfeb72e4e9031f9492148f410ed30bcab54", size = 2619257 }, -] - -[[package]] -name = "mypy-extensions" -version = "1.0.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/98/a4/1ab47638b92648243faf97a5aeb6ea83059cc3624972ab6b8d2316078d3f/mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782", size = 4433 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/2a/e2/5d3f6ada4297caebe1a2add3b126fe800c96f56dbe5d1988a2cbe0b267aa/mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d", size = 4695 }, -] - -[[package]] -name = "nodeenv" -version = "1.9.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/43/16/fc88b08840de0e0a72a2f9d8c6bae36be573e475a6326ae854bcc549fc45/nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f", size = 47437 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d2/1d/1b658dbd2b9fa9c4c9f32accbfc0205d532c8c6194dc0f2a4c0428e7128a/nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9", size = 22314 }, -] - -[[package]] -name = "pyright" -version = "1.1.377" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "nodeenv" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/49/f0/25b0db363d6888164adb7c828b877bbf2c30936955fb9513922ae03e70e4/pyright-1.1.377.tar.gz", hash = "sha256:aabc30fedce0ded34baa0c49b24f10e68f4bfc8f68ae7f3d175c4b0f256b4fcf", size = 17484 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/34/c9/89c40c4de44fe9463e77dddd0c4e2d2dd7a93e8ddc6858dfe7d5f75d263d/pyright-1.1.377-py3-none-any.whl", hash = "sha256:af0dd2b6b636c383a6569a083f8c5a8748ae4dcde5df7914b3f3f267e14dd162", size = 18223 }, -] - [[package]] name = "typing-extensions" version = "4.12.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8", size = 85321 } +sdist = { url = "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8", size = 85321, upload_time = "2024-06-07T18:52:15.995Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", size = 37438 }, + { url = "https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", size = 37438, upload_time = "2024-06-07T18:52:13.582Z" }, ] diff --git a/knot.schema.json b/ty.schema.json similarity index 92% rename from knot.schema.json rename to ty.schema.json index 49bc35855b..a928b06343 100644 --- a/knot.schema.json +++ b/ty.schema.json @@ -88,14 +88,14 @@ } }, "python": { - "description": "Path to the Python installation from which Red Knot resolves type information and third-party dependencies.\n\nRed Knot will search in the path's `site-packages` directories for type information and third-party imports.\n\nThis option is commonly used to specify the path to a virtual environment.", + "description": "Path to the Python installation from which ty resolves type information and third-party dependencies.\n\nty will search in the path's `site-packages` directories for type information and third-party imports.\n\nThis option is commonly used to specify the path to a virtual environment.", "type": [ "string", "null" ] }, "python-platform": { - "description": "Specifies the target platform that will be used to analyze the source code. If specified, Red Knot will tailor its use of type stub files, which conditionalize type definitions based on the platform.\n\nIf no platform is specified, knot will use the current platform: - `win32` for Windows - `darwin` for macOS - `android` for Android - `ios` for iOS - `linux` for everything else", + "description": "Specifies the target platform that will be used to analyze the source code. If specified, ty will tailor its use of type stub files, which conditionalize type definitions based on the platform.\n\nIf no platform is specified, ty will use the current platform: - `win32` for Windows - `darwin` for macOS - `android` for Android - `ios` for iOS - `linux` for everything else", "anyOf": [ { "$ref": "#/definitions/PythonPlatform" @@ -106,7 +106,7 @@ ] }, "python-version": { - "description": "Specifies the version of Python that will be used to analyze the source code. The version should be specified as a string in the format `M.m` where `M` is the major version and `m` is the minor (e.g. \"3.0\" or \"3.6\"). If a version is provided, knot will generate errors if the source code makes use of language features that are not supported in that version. It will also tailor its use of type stub files, which conditionalizes type definitions based on the version.", + "description": "Specifies the version of Python that will be used to analyze the source code. The version should be specified as a string in the format `M.m` where `M` is the major version and `m` is the minor (e.g. \"3.0\" or \"3.6\"). If a version is provided, ty will generate errors if the source code makes use of language features that are not supported in that version. It will also tailor its use of type stub files, which conditionalizes type definitions based on the version.", "anyOf": [ { "$ref": "#/definitions/PythonVersion" @@ -222,7 +222,7 @@ "properties": { "byte-string-type-annotation": { "title": "detects byte strings in type annotation positions", - "description": "## What it does\nChecks for byte-strings in type annotation positions.\n\n## Why is this bad?\nStatic analysis tools like Red Knot can't analyse type annotations that use byte-string notation.\n\n## Examples\n```python\ndef test(): -> b\"int\":\n ...\n```\n\nUse instead:\n```python\ndef test(): -> \"int\":\n ...\n```", + "description": "## What it does\nChecks for byte-strings in type annotation positions.\n\n## Why is this bad?\nStatic analysis tools like ty can't analyse type annotations that use byte-string notation.\n\n## Examples\n```python\ndef test(): -> b\"int\":\n ...\n```\n\nUse instead:\n```python\ndef test(): -> \"int\":\n ...\n```", "default": "error", "oneOf": [ { @@ -322,7 +322,7 @@ }, "fstring-type-annotation": { "title": "detects F-strings in type annotation positions", - "description": "## What it does\nChecks for f-strings in type annotation positions.\n\n## Why is this bad?\nStatic analysis tools like Red Knot can't analyse type annotations that use f-string notation.\n\n## Examples\n```python\ndef test(): -> f\"int\":\n ...\n```\n\nUse instead:\n```python\ndef test(): -> \"int\":\n ...\n```", + "description": "## What it does\nChecks for f-strings in type annotation positions.\n\n## Why is this bad?\nStatic analysis tools like ty can't analyse type annotations that use f-string notation.\n\n## Examples\n```python\ndef test(): -> f\"int\":\n ...\n```\n\nUse instead:\n```python\ndef test(): -> \"int\":\n ...\n```", "default": "error", "oneOf": [ { @@ -332,7 +332,7 @@ }, "implicit-concatenated-string-type-annotation": { "title": "detects implicit concatenated strings in type annotations", - "description": "## What it does\nChecks for implicit concatenated strings in type annotation positions.\n\n## Why is this bad?\nStatic analysis tools like Red Knot can't analyse type annotations that use implicit concatenated strings.\n\n## Examples\n```python\ndef test(): -> \"Literal[\" \"5\" \"]\":\n ...\n```\n\nUse instead:\n```python\ndef test(): -> \"Literal[5]\":\n ...\n```", + "description": "## What it does\nChecks for implicit concatenated strings in type annotation positions.\n\n## Why is this bad?\nStatic analysis tools like ty can't analyse type annotations that use implicit concatenated strings.\n\n## Examples\n```python\ndef test(): -> \"Literal[\" \"5\" \"]\":\n ...\n```\n\nUse instead:\n```python\ndef test(): -> \"Literal[5]\":\n ...\n```", "default": "error", "oneOf": [ { @@ -452,7 +452,7 @@ }, "invalid-ignore-comment": { "title": "detects ignore comments that use invalid syntax", - "description": "## What it does\nChecks for `type: ignore` and `knot: ignore` comments that are syntactically incorrect.\n\n## Why is this bad?\nA syntactically incorrect ignore comment is probably a mistake and is useless.\n\n## Examples\n```py\na = 20 / 0 # type: ignoree\n```\n\nUse instead:\n\n```py\na = 20 / 0 # type: ignore\n```", + "description": "## What it does\nChecks for `type: ignore` and `ty: ignore` comments that are syntactically incorrect.\n\n## Why is this bad?\nA syntactically incorrect ignore comment is probably a mistake and is useless.\n\n## Examples\n```py\na = 20 / 0 # type: ignoree\n```\n\nUse instead:\n\n```py\na = 20 / 0 # type: ignore\n```", "default": "warn", "oneOf": [ { @@ -662,7 +662,7 @@ }, "raw-string-type-annotation": { "title": "detects raw strings in type annotation positions", - "description": "## What it does\nChecks for raw-strings in type annotation positions.\n\n## Why is this bad?\nStatic analysis tools like Red Knot can't analyse type annotations that use raw-string notation.\n\n## Examples\n```python\ndef test(): -> r\"int\":\n ...\n```\n\nUse instead:\n```python\ndef test(): -> \"int\":\n ...\n```", + "description": "## What it does\nChecks for raw-strings in type annotation positions.\n\n## Why is this bad?\nStatic analysis tools like ty can't analyse type annotations that use raw-string notation.\n\n## Examples\n```python\ndef test(): -> r\"int\":\n ...\n```\n\nUse instead:\n```python\ndef test(): -> \"int\":\n ...\n```", "default": "error", "oneOf": [ { @@ -682,7 +682,7 @@ }, "static-assert-error": { "title": "Failed static assertion", - "description": "## What it does\nMakes sure that the argument of `static_assert` is statically known to be true.\n\n## Examples\n```python\nfrom knot_extensions import static_assert\n\nstatic_assert(1 + 1 == 3) # error: evaluates to `False`\n\nstatic_assert(int(2.0 * 3.0) == 6) # error: does not have a statically known truthiness\n```", + "description": "## What it does\nMakes sure that the argument of `static_assert` is statically known to be true.\n\n## Examples\n```python\nfrom ty_extensions import static_assert\n\nstatic_assert(1 + 1 == 3) # error: evaluates to `False`\n\nstatic_assert(int(2.0 * 3.0) == 6) # error: does not have a statically known truthiness\n```", "default": "error", "oneOf": [ { @@ -751,8 +751,8 @@ ] }, "unknown-rule": { - "title": "detects `knot: ignore` comments that reference unknown rules", - "description": "## What it does\nChecks for `knot: ignore[code]` where `code` isn't a known lint rule.\n\n## Why is this bad?\nA `knot: ignore[code]` directive with a `code` that doesn't match\nany known rule will not suppress any type errors, and is probably a mistake.\n\n## Examples\n```py\na = 20 / 0 # knot: ignore[division-by-zer]\n```\n\nUse instead:\n\n```py\na = 20 / 0 # knot: ignore[division-by-zero]\n```", + "title": "detects `ty: ignore` comments that reference unknown rules", + "description": "## What it does\nChecks for `ty: ignore[code]` where `code` isn't a known lint rule.\n\n## Why is this bad?\nA `ty: ignore[code]` directive with a `code` that doesn't match\nany known rule will not suppress any type errors, and is probably a mistake.\n\n## Examples\n```py\na = 20 / 0 # ty: ignore[division-by-zer]\n```\n\nUse instead:\n\n```py\na = 20 / 0 # ty: ignore[division-by-zero]\n```", "default": "warn", "oneOf": [ { @@ -812,7 +812,7 @@ }, "unused-ignore-comment": { "title": "detects unused `type: ignore` comments", - "description": "## What it does\nChecks for `type: ignore` or `knot: ignore` directives that are no longer applicable.\n\n## Why is this bad?\nA `type: ignore` directive that no longer matches any diagnostic violations is likely\nincluded by mistake, and should be removed to avoid confusion.\n\n## Examples\n```py\na = 20 / 2 # knot: ignore[division-by-zero]\n```\n\nUse instead:\n\n```py\na = 20 / 2\n```", + "description": "## What it does\nChecks for `type: ignore` or `ty: ignore` directives that are no longer applicable.\n\n## Why is this bad?\nA `type: ignore` directive that no longer matches any diagnostic violations is likely\nincluded by mistake, and should be removed to avoid confusion.\n\n## Examples\n```py\na = 20 / 2 # ty: ignore[division-by-zero]\n```\n\nUse instead:\n\n```py\na = 20 / 2\n```", "default": "warn", "oneOf": [ {