Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix more cspell warnings #5669

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
15 changes: 11 additions & 4 deletions 15 .cspell.dict/cpython.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ badsyntax
basetype
boolop
bxor
cached_tsver
cellarg
cellvar
cellvars
cmpop
weakreflist
XXPRIME
denom
dictoffset
elts
xstat
excepthandler
fileutils
finalbody
Expand All @@ -30,17 +29,25 @@ linearise
maxdepth
mult
nkwargs
numer
orelse
pathconfig
patma
posonlyarg
posonlyargs
prec
PYTHREAD_NAME
SA_ONSTACK
stackdepth
tok_oldval
unaryop
unparse
unparser
VARKEYWORDS
varkwarg
wbits
weakreflist
withitem
withs
withs
xstat
XXPRIME
36 changes: 36 additions & 0 deletions 36 .cspell.dict/python-more.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ getpip
getrandom
getrecursionlimit
getrefcount
getsizeof
getweakrefcount
getweakrefs
getwindowsversion
Expand All @@ -90,6 +91,7 @@ hamt
hostnames
idfunc
idiv
idxs
impls
indexgroup
infj
Expand All @@ -99,6 +101,7 @@ irepeat
isabstractmethod
isbytes
iscased
isfinal
istext
itemiterator
itemsize
Expand All @@ -111,9 +114,11 @@ kwargs
kwdefaults
kwonlyargcount
lastgroup
lastindex
linearization
linearize
listcomp
longrange
lvalue
mappingproxy
maskpri
Expand All @@ -137,25 +142,39 @@ nbytes
ncallbacks
ndigits
ndim
nldecoder
nlocals
NOARGS
nonbytes
Nonprintable
origname
ospath
pendingcr
phello
platlibdir
posixsubprocess
posonly
posonlyargcount
prepending
profilefunc
pycache
pycodecs
pycs
pyexpat
PYTHONBREAKPOINT
PYTHONDEBUG
PYTHONHASHSEED
PYTHONHOME
PYTHONINSPECT
PYTHONOPTIMIZE
PYTHONPATH
PYTHONPATH
PYTHONSAFEPATH
PYTHONVERBOSE
PYTHONWARNDEFAULTENCODING
PYTHONWARNINGS
pytraverse
PYVENV
qualname
quotetabs
radd
Expand All @@ -164,6 +183,7 @@ rdivmod
readall
readbuffer
reconstructor
refcnt
releaselevel
reverseitemiterator
reverseiterator
Expand All @@ -178,23 +198,37 @@ rsub
rtruediv
rvalue
scproxy
seennl
setattro
setcomp
setrecursionlimit
showwarnmsg
signum
slotnames
STACKLESS
stacklevel
stacksize
startpos
subclassable
subclasscheck
subclasshook
suboffset
suboffsets
SUBPATTERN
sumprod
surrogateescape
surrogatepass
sysconf
sysconfigdata
sysvars
teedata
thisclass
titlecased
tobytes
tolist
toreadonly
TPFLAGS
tracefunc
unimportable
unionable
unraisablehook
Expand All @@ -208,7 +242,9 @@ warningregistry
warnmsg
warnoptions
warnopts
weaklist
weakproxy
weakrefs
winver
withdata
xmlcharrefreplace
Expand Down
10 changes: 10 additions & 0 deletions 10 .cspell.dict/rust-more.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ahash
arrayvec
bidi
biguint
bindgen
Expand All @@ -14,6 +15,8 @@ cranelift
cstring
datelike
deserializer
fdiv
flamescope
flate2
fract
getres
Expand Down Expand Up @@ -44,16 +47,21 @@ objclass
peekable
powc
powf
powi
prepended
punct
puruspe
replacen
rmatch
rposition
rsplitn
rustc
rustfmt
rustyline
seedable
seekfrom
siphash
siphasher
splitn
subsec
thiserror
Expand All @@ -63,8 +71,10 @@ trai
ulonglong
unic
unistd
unraw
unsync
wasmbind
wasmtime
widestring
winapi
winsock
8 changes: 8 additions & 0 deletions 8 .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
],
// words - list of words to be always considered correct
"words": [
"RUSTPYTHONPATH",
// RustPython
"aiterable",
"alnum",
Expand All @@ -69,9 +70,11 @@
"makeunicodedata",
"miri",
"notrace",
"openat",
"pyarg",
"pyarg",
"pyargs",
"pyast",
"PyAttr",
"pyc",
"PyClass",
Expand All @@ -80,6 +83,7 @@
"PyFunction",
"pygetset",
"pyimpl",
"pylib",
"pymember",
"PyMethod",
"PyModule",
Expand All @@ -100,6 +104,7 @@
"richcompare",
"RustPython",
"struc",
"sysmodule",
"tracebacks",
"typealiases",
"Unconstructible",
Expand All @@ -112,11 +117,14 @@
"CLOEXEC",
"codeset",
"endgrent",
"gethrvtime",
"getrusage",
"nanosleep",
"sigaction",
"WRLCK",
// win32
"birthtime",
"IFEXEC",
],
// flagWords - list of words to be always considered incorrect
"flagWords": [
Expand Down
1 change: 1 addition & 0 deletions 1 common/src/format.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// cspell:ignore ddfe
use itertools::{Itertools, PeekingNext};
use malachite_bigint::{BigInt, Sign};
use num_traits::FromPrimitive;
Expand Down
4 changes: 2 additions & 2 deletions 4 common/src/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ pub fn last_posix_errno() -> i32 {
}

#[cfg(unix)]
pub fn bytes_as_osstr(b: &[u8]) -> Result<&std::ffi::OsStr, Utf8Error> {
pub fn bytes_as_os_str(b: &[u8]) -> Result<&std::ffi::OsStr, Utf8Error> {
use std::os::unix::ffi::OsStrExt;
Ok(std::ffi::OsStr::from_bytes(b))
}

#[cfg(not(unix))]
pub fn bytes_as_osstr(b: &[u8]) -> Result<&std::ffi::OsStr, Utf8Error> {
pub fn bytes_as_os_str(b: &[u8]) -> Result<&std::ffi::OsStr, Utf8Error> {
Ok(std::str::from_utf8(b)?.as_ref())
}

Expand Down
4 changes: 2 additions & 2 deletions 4 common/src/static_cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ mod threading {

impl<T> StaticCell<T> {
#[doc(hidden)]
pub const fn _from_oncecell(inner: OnceCell<T>) -> Self {
pub const fn _from_once_cell(inner: OnceCell<T>) -> Self {
Self { inner }
}

Expand Down Expand Up @@ -108,7 +108,7 @@ mod threading {
($($(#[$attr:meta])* $vis:vis static $name:ident: $t:ty;)+) => {
$($(#[$attr])*
$vis static $name: $crate::static_cell::StaticCell<$t> =
$crate::static_cell::StaticCell::_from_oncecell($crate::lock::OnceCell::new());)+
$crate::static_cell::StaticCell::_from_once_cell($crate::lock::OnceCell::new());)+
};
}
}
Expand Down
8 changes: 4 additions & 4 deletions 8 common/src/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ pub fn get_chars(s: &str, range: impl RangeBounds<usize>) -> &str {
}

#[inline]
pub fn char_range_end(s: &str, nchars: usize) -> Option<usize> {
let i = match nchars.checked_sub(1) {
pub fn char_range_end(s: &str, n_chars: usize) -> Option<usize> {
let i = match n_chars.checked_sub(1) {
Some(last_char_index) => {
let (index, c) = s.char_indices().nth(last_char_index)?;
index + c.len_utf8()
Expand Down Expand Up @@ -395,8 +395,8 @@ pub fn get_codepoints(w: &Wtf8, range: impl RangeBounds<usize>) -> &Wtf8 {
}

#[inline]
pub fn codepoint_range_end(s: &Wtf8, nchars: usize) -> Option<usize> {
let i = match nchars.checked_sub(1) {
pub fn codepoint_range_end(s: &Wtf8, n_chars: usize) -> Option<usize> {
let i = match n_chars.checked_sub(1) {
Some(last_char_index) => {
let (index, c) = s.code_point_indices().nth(last_char_index)?;
index + c.len_wtf8()
Expand Down
8 changes: 4 additions & 4 deletions 8 src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,14 @@ fn write_profile(settings: &Settings) -> Result<(), Box<dyn std::error::Error>>
enum ProfileFormat {
Html,
Text,
Speedscope,
SpeedScore,
}
let profile_output = settings.profile_output.as_deref();
let profile_format = match settings.profile_format.as_deref() {
Some("html") => ProfileFormat::Html,
Some("text") => ProfileFormat::Text,
None if profile_output == Some("-".as_ref()) => ProfileFormat::Text,
Some("speedscope") | None => ProfileFormat::Speedscope,
Some("speedscope") | None => ProfileFormat::SpeedScore,
Some(other) => {
error!("Unknown profile format {}", other);
// TODO: Need to change to ExitCode or Termination
Expand All @@ -251,7 +251,7 @@ fn write_profile(settings: &Settings) -> Result<(), Box<dyn std::error::Error>>
let profile_output = profile_output.unwrap_or_else(|| match profile_format {
ProfileFormat::Html => "flame-graph.html".as_ref(),
ProfileFormat::Text => "flame.txt".as_ref(),
ProfileFormat::Speedscope => "flamescope.json".as_ref(),
ProfileFormat::SpeedScore => "flamescope.json".as_ref(),
});

let profile_output: Box<dyn io::Write> = if profile_output == "-" {
Expand All @@ -265,7 +265,7 @@ fn write_profile(settings: &Settings) -> Result<(), Box<dyn std::error::Error>>
match profile_format {
ProfileFormat::Html => flame::dump_html(profile_output)?,
ProfileFormat::Text => flame::dump_text_to_writer(profile_output)?,
ProfileFormat::Speedscope => flamescope::dump(profile_output)?,
ProfileFormat::SpeedScore => flamescope::dump(profile_output)?,
}

Ok(())
Expand Down
Loading
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.