mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:24:57 +00:00
[ty] Sync vendored typeshed stubs (#20031)
Some checks are pending
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (linux, release) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Waiting to run
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz build (push) Blocked by required conditions
CI / fuzz parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / Fuzz for new ty panics (push) Blocked by required conditions
CI / cargo shear (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / check playground (push) Blocked by required conditions
CI / benchmarks-instrumented (push) Blocked by required conditions
CI / benchmarks-walltime (push) Blocked by required conditions
[ty Playground] Release / publish (push) Waiting to run
Some checks are pending
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (linux, release) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Waiting to run
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz build (push) Blocked by required conditions
CI / fuzz parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / Fuzz for new ty panics (push) Blocked by required conditions
CI / cargo shear (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / check playground (push) Blocked by required conditions
CI / benchmarks-instrumented (push) Blocked by required conditions
CI / benchmarks-walltime (push) Blocked by required conditions
[ty Playground] Release / publish (push) Waiting to run
Co-authored-by: typeshedbot <> Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
This commit is contained in:
parent
f82025d919
commit
7a44ea680e
147 changed files with 2478 additions and 2031 deletions
|
@ -91,14 +91,14 @@ error[missing-argument]: No argument provided for required parameter `arg` of bo
|
|||
7 | from typing_extensions import deprecated
|
||||
|
|
||||
info: Parameter declared here
|
||||
--> stdlib/typing_extensions.pyi:967:28
|
||||
--> stdlib/typing_extensions.pyi:973:28
|
||||
|
|
||||
965 | stacklevel: int
|
||||
966 | def __init__(self, message: LiteralString, /, *, category: type[Warning] | None = ..., stacklevel: int = 1) -> None: ...
|
||||
967 | def __call__(self, arg: _T, /) -> _T: ...
|
||||
971 | stacklevel: int
|
||||
972 | def __init__(self, message: LiteralString, /, *, category: type[Warning] | None = ..., stacklevel: int = 1) -> None: ...
|
||||
973 | def __call__(self, arg: _T, /) -> _T: ...
|
||||
| ^^^^^^^
|
||||
968 |
|
||||
969 | @final
|
||||
974 |
|
||||
975 | @final
|
||||
|
|
||||
info: rule `missing-argument` is enabled by default
|
||||
|
||||
|
|
|
@ -4680,20 +4680,11 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> {
|
|||
}
|
||||
|
||||
// Handle various singletons.
|
||||
if let Type::NominalInstance(instance) = declared.inner_type() {
|
||||
if instance
|
||||
.class(self.db())
|
||||
.is_known(self.db(), KnownClass::SpecialForm)
|
||||
if let Some(name_expr) = target.as_name_expr() {
|
||||
if let Some(special_form) =
|
||||
SpecialFormType::try_from_file_and_name(self.db(), self.file(), &name_expr.id)
|
||||
{
|
||||
if let Some(name_expr) = target.as_name_expr() {
|
||||
if let Some(special_form) = SpecialFormType::try_from_file_and_name(
|
||||
self.db(),
|
||||
self.file(),
|
||||
&name_expr.id,
|
||||
) {
|
||||
declared.inner = Type::SpecialForm(special_form);
|
||||
}
|
||||
}
|
||||
declared.inner = Type::SpecialForm(special_form);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -154,9 +154,10 @@ impl SpecialFormType {
|
|||
| Self::Intersection
|
||||
| Self::CallableTypeOf
|
||||
| Self::Protocol // actually `_ProtocolMeta` at runtime but this is what typeshed says
|
||||
| Self::Generic // actually `type` at runtime but this is what typeshed says
|
||||
| Self::ReadOnly => KnownClass::SpecialForm,
|
||||
|
||||
Self::Generic => KnownClass::Type,
|
||||
|
||||
Self::List
|
||||
| Self::Dict
|
||||
| Self::DefaultDict
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue