Skip to content

Commit 643308b

Browse files
committed
Rename constevaluator_alloc to const_evaluator_alloc, add to cspell dict
1 parent 66a330c commit 643308b

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

.cspell.dict/cpython.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ CLASSDEREF
3131
classdict
3232
cmpop
3333
codedepth
34+
constevaluator
3435
CODEUNIT
3536
CONVFUNC
3637
convparam

crates/vm/src/stdlib/typevar.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pub(crate) mod typevar {
1010
common::lock::PyMutex,
1111
function::{FuncArgs, PyComparisonValue},
1212
protocol::PyNumberMethods,
13-
stdlib::typing::{call_typing_func_object, decl::constevaluator_alloc},
13+
stdlib::typing::{call_typing_func_object, decl::const_evaluator_alloc},
1414
types::{AsNumber, Comparable, Constructor, Iterable, PyComparisonOp, Representable},
1515
};
1616

@@ -158,7 +158,7 @@ pub(crate) mod typevar {
158158
}
159159
let bound = self.bound.lock();
160160
if !vm.is_none(&bound) {
161-
return Ok(constevaluator_alloc(bound.clone(), vm));
161+
return Ok(const_evaluator_alloc(bound.clone(), vm));
162162
}
163163
Ok(vm.ctx.none())
164164
}
@@ -170,7 +170,7 @@ pub(crate) mod typevar {
170170
}
171171
let constraints = self.constraints.lock();
172172
if !vm.is_none(&constraints) {
173-
return Ok(constevaluator_alloc(constraints.clone(), vm));
173+
return Ok(const_evaluator_alloc(constraints.clone(), vm));
174174
}
175175
Ok(vm.ctx.none())
176176
}
@@ -183,7 +183,7 @@ pub(crate) mod typevar {
183183
}
184184
let default_value = self.default_value.lock();
185185
if !default_value.is(&vm.ctx.typing_no_default) {
186-
return Ok(constevaluator_alloc(default_value.clone(), vm));
186+
return Ok(const_evaluator_alloc(default_value.clone(), vm));
187187
}
188188
Ok(vm.ctx.none())
189189
}
@@ -521,7 +521,7 @@ pub(crate) mod typevar {
521521
}
522522
let default_value = self.default_value.lock();
523523
if !default_value.is(&vm.ctx.typing_no_default) {
524-
return Ok(constevaluator_alloc(default_value.clone(), vm));
524+
return Ok(const_evaluator_alloc(default_value.clone(), vm));
525525
}
526526
Ok(vm.ctx.none())
527527
}
@@ -716,7 +716,7 @@ pub(crate) mod typevar {
716716
}
717717
let default_value = self.default_value.lock();
718718
if !default_value.is(&vm.ctx.typing_no_default) {
719-
return Ok(constevaluator_alloc(default_value.clone(), vm));
719+
return Ok(const_evaluator_alloc(default_value.clone(), vm));
720720
}
721721
Ok(vm.ctx.none())
722722
}

crates/vm/src/stdlib/typing.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ pub(crate) mod decl {
175175
}
176176
}
177177

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

@@ -294,7 +294,7 @@ pub(crate) mod decl {
294294
if self.is_lazy {
295295
return Ok(self.compute_value.clone());
296296
}
297-
Ok(constevaluator_alloc(self.compute_value.clone(), vm))
297+
Ok(const_evaluator_alloc(self.compute_value.clone(), vm))
298298
}
299299

300300
/// Check type_params ordering: non-default params must precede default params.

0 commit comments

Comments
 (0)