[ty] Sync vendored typeshed stubs (#20083)

Co-authored-by: typeshedbot <>
Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
This commit is contained in:
github-actions[bot] 2025-08-25 17:01:51 +00:00 committed by GitHub
parent db423ee978
commit ba47010150
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
84 changed files with 1733 additions and 846 deletions

View file

@ -1409,7 +1409,12 @@ mod implicit_globals {
/// Conceptually this function could be a `Set` rather than a list,
/// but the number of symbols declared in this scope is likely to be very small,
/// so the cost of hashing the names is likely to be more expensive than it's worth.
#[salsa::tracked(returns(deref), heap_size=ruff_memory_usage::heap_size)]
#[salsa::tracked(
returns(deref),
cycle_initial=module_type_symbols_initial,
cycle_fn=module_type_symbols_cycle_recover,
heap_size=ruff_memory_usage::heap_size
)]
fn module_type_symbols<'db>(db: &'db dyn Db) -> smallvec::SmallVec<[ast::name::Name; 8]> {
let Some(module_type) = KnownClass::ModuleType
.to_class_literal(db)
@ -1437,6 +1442,18 @@ mod implicit_globals {
.collect()
}
fn module_type_symbols_initial(_db: &dyn Db) -> smallvec::SmallVec<[ast::name::Name; 8]> {
smallvec::SmallVec::default()
}
fn module_type_symbols_cycle_recover(
_db: &dyn Db,
_value: &smallvec::SmallVec<[ast::name::Name; 8]>,
_count: u32,
) -> salsa::CycleRecoveryAction<smallvec::SmallVec<[ast::name::Name; 8]>> {
salsa::CycleRecoveryAction::Iterate
}
#[cfg(test)]
mod tests {
use super::*;