Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Rename constevaluator_alloc to const_evaluator_alloc, add to cspell dict
  • Loading branch information
youknowone committed Feb 11, 2026
commit 5242dd42e18c6ec58386dddf6da6f7d68658530d
1 change: 1 addition & 0 deletions .cspell.dict/cpython.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ CLASSDEREF
classdict
cmpop
codedepth
constevaluator
CODEUNIT
CONVFUNC
convparam
Expand Down
12 changes: 6 additions & 6 deletions crates/vm/src/stdlib/typevar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub(crate) mod typevar {
common::lock::PyMutex,
function::{FuncArgs, PyComparisonValue},
protocol::PyNumberMethods,
stdlib::typing::{call_typing_func_object, decl::constevaluator_alloc},
stdlib::typing::{call_typing_func_object, decl::const_evaluator_alloc},
types::{AsNumber, Comparable, Constructor, Iterable, PyComparisonOp, Representable},
};

Expand Down Expand Up @@ -158,7 +158,7 @@ pub(crate) mod typevar {
}
let bound = self.bound.lock();
if !vm.is_none(&bound) {
return Ok(constevaluator_alloc(bound.clone(), vm));
return Ok(const_evaluator_alloc(bound.clone(), vm));
}
Ok(vm.ctx.none())
}
Expand All @@ -170,7 +170,7 @@ pub(crate) mod typevar {
}
let constraints = self.constraints.lock();
if !vm.is_none(&constraints) {
return Ok(constevaluator_alloc(constraints.clone(), vm));
return Ok(const_evaluator_alloc(constraints.clone(), vm));
}
Ok(vm.ctx.none())
}
Expand All @@ -183,7 +183,7 @@ pub(crate) mod typevar {
}
let default_value = self.default_value.lock();
if !default_value.is(&vm.ctx.typing_no_default) {
return Ok(constevaluator_alloc(default_value.clone(), vm));
return Ok(const_evaluator_alloc(default_value.clone(), vm));
}
Ok(vm.ctx.none())
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Expand Down Expand Up @@ -521,7 +521,7 @@ pub(crate) mod typevar {
}
let default_value = self.default_value.lock();
if !default_value.is(&vm.ctx.typing_no_default) {
return Ok(constevaluator_alloc(default_value.clone(), vm));
return Ok(const_evaluator_alloc(default_value.clone(), vm));
}
Ok(vm.ctx.none())
}
Expand Down Expand Up @@ -716,7 +716,7 @@ pub(crate) mod typevar {
}
let default_value = self.default_value.lock();
if !default_value.is(&vm.ctx.typing_no_default) {
return Ok(constevaluator_alloc(default_value.clone(), vm));
return Ok(const_evaluator_alloc(default_value.clone(), vm));
}
Ok(vm.ctx.none())
}
Expand Down
4 changes: 2 additions & 2 deletions crates/vm/src/stdlib/typing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ pub(crate) mod decl {
}
}

pub(crate) fn constevaluator_alloc(value: PyObjectRef, vm: &VirtualMachine) -> PyObjectRef {
pub(crate) fn const_evaluator_alloc(value: PyObjectRef, vm: &VirtualMachine) -> PyObjectRef {
ConstEvaluator { value }.into_ref(&vm.ctx).into()
}

Expand Down Expand Up @@ -294,7 +294,7 @@ pub(crate) mod decl {
if self.is_lazy {
return Ok(self.compute_value.clone());
}
Ok(constevaluator_alloc(self.compute_value.clone(), vm))
Ok(const_evaluator_alloc(self.compute_value.clone(), vm))
}

/// Check type_params ordering: non-default params must precede default params.
Expand Down
Loading