Skip to content

Commit b81ae9b

Browse files
authored
More cspell fixes (RustPython#5670)
1 parent d96374f commit b81ae9b

File tree

13 files changed

+27
-21
lines changed

13 files changed

+27
-21
lines changed

.cspell.dict/rust-more.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ modpow
4343
msvc
4444
muldiv
4545
nanos
46+
nonoverlapping
4647
objclass
4748
peekable
4849
powc

.cspell.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
// words - list of words to be always considered correct
4848
"words": [
4949
"RUSTPYTHONPATH",
50-
// RustPython
50+
// RustPython terms
5151
"aiterable",
5252
"alnum",
5353
"baseclass",
@@ -67,6 +67,7 @@
6767
"GetSet",
6868
"groupref",
6969
"internable",
70+
"lossily",
7071
"makeunicodedata",
7172
"miri",
7273
"notrace",
@@ -96,6 +97,7 @@
9697
"PyResult",
9798
"pyslot",
9899
"PyStaticMethod",
100+
"pystone",
99101
"pystr",
100102
"pystruct",
101103
"pystructseq",
@@ -104,13 +106,16 @@
104106
"richcompare",
105107
"RustPython",
106108
"struc",
109+
// plural of summand
110+
"summands",
107111
"sysmodule",
108112
"tracebacks",
109113
"typealiases",
110-
"Unconstructible",
114+
"unconstructible",
111115
"unhashable",
112116
"uninit",
113117
"unraisable",
118+
"unresizable",
114119
"wasi",
115120
"zelf",
116121
// unix

Lib/test/test_bytes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1992,7 +1992,7 @@ def test_join(self):
19921992
s3 = s1.join([b"abcd"])
19931993
self.assertIs(type(s3), self.basetype)
19941994

1995-
@unittest.skip("TODO: RUSTPYHON, Fails on ByteArraySubclassWithSlotsTest")
1995+
@unittest.skip("TODO: RUSTPYTHON, Fails on ByteArraySubclassWithSlotsTest")
19961996
def test_pickle(self):
19971997
a = self.type2test(b"abcd")
19981998
a.x = 10
@@ -2007,7 +2007,7 @@ def test_pickle(self):
20072007
self.assertEqual(type(a.z), type(b.z))
20082008
self.assertFalse(hasattr(b, 'y'))
20092009

2010-
@unittest.skip("TODO: RUSTPYHON, Fails on ByteArraySubclassWithSlotsTest")
2010+
@unittest.skip("TODO: RUSTPYTHON, Fails on ByteArraySubclassWithSlotsTest")
20112011
def test_copy(self):
20122012
a = self.type2test(b"abcd")
20132013
a.x = 10

Lib/test/test_sqlite3/test_dbapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ def test_connection_bad_reinit(self):
591591
((v,) for v in range(3)))
592592

593593

594-
@unittest.skip("TODO: RUSTPYHON")
594+
@unittest.skip("TODO: RUSTPYTHON")
595595
class UninitialisedConnectionTests(unittest.TestCase):
596596
def setUp(self):
597597
self.cx = sqlite.Connection.__new__(sqlite.Connection)

benches/execution.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fn bench_cpython_code(b: &mut Bencher, source: &str) {
1818
})
1919
}
2020

21-
fn bench_rustpy_code(b: &mut Bencher, name: &str, source: &str) {
21+
fn bench_rustpython_code(b: &mut Bencher, name: &str, source: &str) {
2222
// NOTE: Take long time.
2323
let mut settings = Settings::default();
2424
settings.path_list.push("Lib/".to_string());
@@ -41,7 +41,7 @@ pub fn benchmark_file_execution(group: &mut BenchmarkGroup<WallTime>, name: &str
4141
bench_cpython_code(b, contents)
4242
});
4343
group.bench_function(BenchmarkId::new(name, "rustpython"), |b| {
44-
bench_rustpy_code(b, name, contents)
44+
bench_rustpython_code(b, name, contents)
4545
});
4646
}
4747

@@ -77,7 +77,7 @@ pub fn benchmark_pystone(group: &mut BenchmarkGroup<WallTime>, contents: String)
7777
bench_cpython_code(b, code_str)
7878
});
7979
group.bench_function(BenchmarkId::new("rustpython", idx), |b| {
80-
bench_rustpy_code(b, "pystone", code_str)
80+
bench_rustpython_code(b, "pystone", code_str)
8181
});
8282
}
8383
}

benches/microbenchmarks.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ fn cpy_compile_code<'a>(
104104
compile.call1((code, name, "exec"))?.extract()
105105
}
106106

107-
fn bench_rustpy_code(group: &mut BenchmarkGroup<WallTime>, bench: &MicroBenchmark) {
107+
fn bench_rustpython_code(group: &mut BenchmarkGroup<WallTime>, bench: &MicroBenchmark) {
108108
let mut settings = Settings::default();
109109
settings.path_list.push("Lib/".to_string());
110110
settings.write_bytecode = false;
@@ -169,7 +169,7 @@ pub fn run_micro_benchmark(c: &mut Criterion, benchmark: MicroBenchmark) {
169169
let mut group = c.benchmark_group("microbenchmarks");
170170

171171
bench_cpython_code(&mut group, &benchmark);
172-
bench_rustpy_code(&mut group, &benchmark);
172+
bench_rustpython_code(&mut group, &benchmark);
173173

174174
group.finish();
175175
}

common/src/float_ops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use malachite_bigint::{BigInt, ToBigInt};
22
use num_traits::{Float, Signed, ToPrimitive, Zero};
33
use std::f64;
44

5-
pub fn ufrexp(value: f64) -> (f64, i32) {
5+
pub fn decompose_float(value: f64) -> (f64, i32) {
66
if 0.0 == value {
77
(0.0, 0i32)
88
} else {

common/src/hash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ pub fn hash_float(value: f64) -> Option<PyHash> {
9797
};
9898
}
9999

100-
let frexp = super::float_ops::ufrexp(value);
100+
let frexp = super::float_ops::decompose_float(value);
101101

102102
// process 28 bits at a time; this should work well both for binary
103103
// and hexadecimal floating point.

stdlib/src/math.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ mod math {
557557
fn frexp(x: ArgIntoFloat) -> (f64, i32) {
558558
let value = *x;
559559
if value.is_finite() {
560-
let (m, exp) = float_ops::ufrexp(value);
560+
let (m, exp) = float_ops::decompose_float(value);
561561
(m * value.signum(), exp)
562562
} else {
563563
(value, 0)

wasm/demo/src/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ let rp;
1313

1414
// A dependency graph that contains any wasm must be imported asynchronously.
1515
import('rustpython')
16-
.then((rustpy) => {
17-
rp = rustpy;
16+
.then((rustpython) => {
17+
rp = rustpython;
1818
// so people can play around with it
19-
window.rp = rustpy;
19+
window.rp = rustpython;
2020
onReady();
2121
})
2222
.catch((e) => {

wasm/lib/src/js_module.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ mod _js {
575575
Some(prom) => {
576576
if val.is_some() {
577577
Err(vm.new_type_error(
578-
"can't send non-None value to an awaitpromise".to_owned(),
578+
"can't send non-None value to an AwaitPromise".to_owned(),
579579
))
580580
} else {
581581
Ok(PyIterReturn::Return(prom))

wasm/notebook/src/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ let rp;
3434

3535
// A dependency graph that contains any wasm must be imported asynchronously.
3636
import('rustpython')
37-
.then((rustpy) => {
38-
rp = rustpy;
37+
.then((rustpython) => {
38+
rp = rustpython;
3939
// so people can play around with it
40-
window.rp = rustpy;
40+
window.rp = rustpython;
4141
onReady();
4242
})
4343
.catch((e) => {

wtf8/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ impl Wtf8 {
757757

758758
/// Create a WTF-8 slice from a WTF-8 byte slice.
759759
//
760-
// whooops! using WTF-8 for interchange!
760+
// whoops! using WTF-8 for interchange!
761761
#[inline]
762762
pub fn from_bytes(b: &[u8]) -> Option<&Self> {
763763
let mut rest = b;

0 commit comments

Comments
 (0)