Skip to content

Commit 937b0d3

Browse files
committed
fix the typos
1 parent cf54a78 commit 937b0d3

File tree

10 files changed

+19
-19
lines changed

10 files changed

+19
-19
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,5 +128,5 @@ opt-level = 3
128128
lto = "thin"
129129

130130
[patch.crates-io]
131-
# REDOX START, Uncommment when you want to compile/check with redoxer
131+
# REDOX START, Uncomment when you want to compile/check with redoxer
132132
# REDOX END

vm/src/builtins/memory.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ impl PyMemoryView {
486486
}
487487
}
488488
if !is_adjusted {
489-
// no suboffset setted, stride must be positive
489+
// no suboffset set, stride must be positive
490490
self.start += stride as usize * range.start;
491491
}
492492
let newlen = range.len();
@@ -507,7 +507,7 @@ impl PyMemoryView {
507507
}
508508
}
509509
if !is_adjusted_suboffset {
510-
// no suboffset setted, stride must be positive
510+
// no suboffset set, stride must be positive
511511
self.start += stride as usize
512512
* if step.is_negative() {
513513
range.end - 1
@@ -521,7 +521,7 @@ impl PyMemoryView {
521521
Ok(())
522522
}
523523

524-
/// return the length of the first dimention
524+
/// return the length of the first dimension
525525
#[pymethod(magic)]
526526
fn len(&self, vm: &VirtualMachine) -> PyResult<usize> {
527527
self.try_not_released(vm)?;

vm/src/builtins/range.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,12 +295,12 @@ impl PyRange {
295295

296296
#[pymethod(magic)]
297297
fn reduce(&self, vm: &VirtualMachine) -> (PyTypeRef, PyTupleRef) {
298-
let range_paramters: Vec<PyObjectRef> = vec![&self.start, &self.stop, &self.step]
298+
let range_parameters: Vec<PyObjectRef> = vec![&self.start, &self.stop, &self.step]
299299
.iter()
300300
.map(|x| x.as_object().to_owned())
301301
.collect();
302-
let range_paramters_tuple = vm.ctx.new_tuple(range_paramters);
303-
(vm.ctx.types.range_type.to_owned(), range_paramters_tuple)
302+
let range_parameters_tuple = vm.ctx.new_tuple(range_parameters);
303+
(vm.ctx.types.range_type.to_owned(), range_parameters_tuple)
304304
}
305305

306306
#[pymethod]

vm/src/object/core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ impl<T: PyObjectPayload> PyWeakRef<T> {
10771077
}
10781078
}
10791079

1080-
/// Paritally initialize a struct, ensuring that all fields are
1080+
/// Partially initialize a struct, ensuring that all fields are
10811081
/// either given values or explicitly left uninitialized
10821082
macro_rules! partially_init {
10831083
(

vm/src/stdlib/builtins.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ pub fn make_module(vm: &VirtualMachine, module: PyObjectRef) {
996996
"NotImplemented" => ctx.not_implemented(),
997997
"Ellipsis" => vm.ctx.ellipsis.clone(),
998998

999-
// ordered by exception_hierarachy.txt
999+
// ordered by exception_hierarchy.txt
10001000
// Exceptions:
10011001
"BaseException" => ctx.exceptions.base_exception_type.to_owned(),
10021002
"SystemExit" => ctx.exceptions.system_exit.to_owned(),

vm/src/stdlib/io.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,7 +1552,7 @@ mod _io {
15521552
}
15531553
let flush_res = data.flush(vm);
15541554
let close_res = vm.call_method(data.raw.as_ref().unwrap(), "close", ());
1555-
exeption_chain(flush_res, close_res)
1555+
exception_chain(flush_res, close_res)
15561556
}
15571557

15581558
#[pymethod]
@@ -1568,7 +1568,7 @@ mod _io {
15681568
let data = zelf.lock(vm)?;
15691569
let raw = data.raw.as_ref().unwrap();
15701570
let close_res = vm.call_method(raw, "close", ());
1571-
exeption_chain(flush_res, close_res)
1571+
exception_chain(flush_res, close_res)
15721572
}
15731573

15741574
#[pymethod]
@@ -1657,7 +1657,7 @@ mod _io {
16571657
}
16581658
}
16591659

1660-
fn exeption_chain<T>(e1: PyResult<()>, e2: PyResult<T>) -> PyResult<T> {
1660+
fn exception_chain<T>(e1: PyResult<()>, e2: PyResult<T>) -> PyResult<T> {
16611661
match (e1, e2) {
16621662
(Err(e1), Err(e)) => {
16631663
e.set_context(Some(e1));
@@ -1858,7 +1858,7 @@ mod _io {
18581858
fn close(&self, vm: &VirtualMachine) -> PyResult {
18591859
let write_res = self.write.close_strict(vm).map(drop);
18601860
let read_res = self.read.close_strict(vm);
1861-
exeption_chain(write_res, read_res)
1861+
exception_chain(write_res, read_res)
18621862
}
18631863
}
18641864

@@ -2897,7 +2897,7 @@ mod _io {
28972897
}
28982898
let flush_res = vm.call_method(zelf.as_object(), "flush", ()).map(drop);
28992899
let close_res = vm.call_method(&buffer, "close", ()).map(drop);
2900-
exeption_chain(flush_res, close_res)
2900+
exception_chain(flush_res, close_res)
29012901
}
29022902
#[pygetset]
29032903
fn closed(&self, vm: &VirtualMachine) -> PyResult {

wasm/lib/src/browser_module.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ mod _browser {
2929
"json" => Ok(FetchResponseFormat::Json),
3030
"text" => Ok(FetchResponseFormat::Text),
3131
"array_buffer" => Ok(FetchResponseFormat::ArrayBuffer),
32-
_ => Err(vm.new_type_error("Unkown fetch response_format".into())),
32+
_ => Err(vm.new_type_error("Unknown fetch response_format".into())),
3333
}
3434
}
3535
fn get_response(&self, response: &web_sys::Response) -> Result<Promise, JsValue> {

wasm/notebook/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ async function executeNotebook() {
229229
*/
230230
let parsedCode = iomdParser(mainCode);
231231
for (const chunk of parsedCode) {
232-
// For each type of chunk, do somthing
232+
// For each type of chunk, do something
233233
// so far have py for python, md for markdown and math for math ;p
234234
let content = chunk.chunkContent;
235235
switch (chunk.chunkType) {

wasm/notebook/src/process.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function renderMarkdown(md) {
1919

2020
// Render Math with Katex
2121
function renderMath(math) {
22-
// TODO: definetly add error handling.
22+
// TODO: definitely add error handling.
2323
return katex.renderToString(math, {
2424
macros: { '\\f': '#1f(#2)' },
2525
});

whats_left.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def compare():
345345
import json
346346
import platform
347347

348-
def method_incompatability_reason(typ, method_name, real_method_value):
348+
def method_incompatibility_reason(typ, method_name, real_method_value):
349349
has_method = hasattr(typ, method_name)
350350
if not has_method:
351351
return ""
@@ -364,7 +364,7 @@ def method_incompatability_reason(typ, method_name, real_method_value):
364364
for name, (typ, real_value, methods) in expected_methods.items():
365365
missing_methods = {}
366366
for method, real_method_value in methods:
367-
reason = method_incompatability_reason(typ, method, real_method_value)
367+
reason = method_incompatibility_reason(typ, method, real_method_value)
368368
if reason is not None:
369369
missing_methods[method] = reason
370370
if missing_methods:

0 commit comments

Comments
 (0)