8000 Fix cspell warning by youknowone · Pull Request #5890 · RustPython/RustPython · GitHub
[go: up one dir, main page]

Skip to content

Fix cspell warning #5890

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 2 commits into from
Jul 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversa 8000 tions
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/src/boxvec.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable
//! An unresizable vector backed by a `Box<[T]>`
#![allow(clippy::needless_lifetimes)]
Expand Down
2 changes: 1 addition & 1 deletion common/src/format.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:ignore ddfe
// spell-checker:ignore ddfe
use itertools::{Itertools, PeekingNext};
use malachite_bigint::{BigInt, Sign};
use num_traits::FromPrimitive;
Expand Down
2 changes: 1 addition & 1 deletion common/src/linked_list.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable

//! This module is modified from tokio::util::linked_list: <https://github.com/tokio-rs/tokio/blob/master/tokio/src/util/linked_list.rs>
//! Tokio is licensed under the MIT license:
Expand Down
1 change: 1 addition & 0 deletions common/src/lock/cell_lock.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// spell-checker:ignore upgradably sharedly
use lock_api::{
GetThreadId, RawMutex, RawRwLock, RawRwLockDowngrade, RawRwLockRecursive, RawRwLockUpgrade,
RawRwLockUpgradeDowngrade,
Expand Down
2 changes: 1 addition & 1 deletion common/src/os.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable
// TODO: we can move more os-specific bindings/interfaces from stdlib::{os, posix, nt} to here

use std::{io, str::Utf8Error};
Expand Down
2 changes: 1 addition & 1 deletion common/src/str.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:ignore uncomputed
// spell-checker:ignore uncomputed
use crate::atomic::{PyAtomic, Radium};
use crate::format::CharLen;
use crate::wtf8::{CodePoint, Wtf8, Wtf8Buf};
Expand Down
2 changes: 1 addition & 1 deletion example_projects/frozen_stdlib/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:ignore aheui
// spell-checker:ignore aheui
/// Setting up a project with a frozen stdlib can be done *either* by using `rustpython::InterpreterConfig` or `rustpython_vm::Interpreter::with_init`.
/// See each function for example.
///
Expand Down
2 changes: 1 addition & 1 deletion jit/src/instructions.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell: disable
// spell-checker: disable
use super::{JitCompileError, JitSig, JitType};
use cranelift::codegen::ir::FuncRef;
use cranelift::prelude::*;
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ fn write_profile(settings: &Settings) -> Result<(), Box<dyn std::error::Error>>
Some("html") => ProfileFormat::Html,
Some("text") => ProfileFormat::Text,
None if profile_output == Some("-".as_ref()) => ProfileFormat::Text,
// cspell:ignore speedscope
// spell-checker:ignore speedscope
Some("speedscope") | None => ProfileFormat::SpeedScope,
Some(other) => {
error!("Unknown profile format {}", other);
Expand Down
2 changes: 1 addition & 1 deletion stdlib/build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:ignore ossl osslconf
// spell-checker:ignore ossl osslconf

fn main() {
println!(r#"cargo::rustc-check-cfg=cfg(osslconf, values("OPENSSL_NO_COMP"))"#);
Expand Down
2 changes: 1 addition & 1 deletion stdlib/src/compression.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:ignore chunker
// spell-checker:ignore chunker

//! internal shared module for compression libraries

Expand Down
2 changes: 1 addition & 1 deletion stdlib/src/fcntl.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable

pub(crate) use fcntl::make_module;

Expand Down
2 changes: 1 addition & 1 deletion stdlib/src/grp.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable
pub(crate) use grp::make_module;

#[pymodule]
Expand Down
2 changes: 1 addition & 1 deletion stdlib/src/json/machinery.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:ignore LOJKINE
// spell-checker:ignore LOJKINE
// derived from https://github.com/lovasoa/json_in_type

// BSD 2-Clause License
Expand Down
2 changes: 1 addition & 1 deletion stdlib/src/locale.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:ignore abday abmon yesexpr noexpr CRNCYSTR RADIXCHAR AMPM THOUSEP
// spell-checker:ignore abday abmon yesexpr noexpr CRNCYSTR RADIXCHAR AMPM THOUSEP

pub(crate) use _locale::make_module;

Expand Down
2 changes: 1 addition & 1 deletion stdlib/src/mmap.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable
//! mmap module
pub(crate) use mmap::make_module;

Expand Down
106D2
2 changes: 1 addition & 1 deletion stdlib/src/overlapped.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable

pub(crate) use _overlapped::make_module;

Expand Down
2 changes: 1 addition & 1 deletion stdlib/src/posixsubprocess.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable

use crate::vm::{
builtins::PyListRef,
Expand Down
2 changes: 1 addition & 1 deletion stdlib/src/resource.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable

pub(crate) use resource::make_module;

Expand Down
2 changes: 1 addition & 1 deletion stdlib/src/select.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable

use crate::vm::{
PyObject, PyObjectRef, PyRef, PyResult, TryFromObject, VirtualMachine, builtins::PyListRef,
Expand Down
2 changes: 1 addition & 1 deletion stdlib/src/socket.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable

use crate::vm::{PyRef, VirtualMachine, builtins::PyModule};
#[cfg(feature = "ssl")]
Expand Down
2 changes: 1 addition & 1 deletion stdlib/src/ssl.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable

use crate::vm::{PyRef, VirtualMachine, builtins::PyModule};
use openssl_probe::ProbeResult;
Expand Down
2 changes: 1 addition & 1 deletion stdlib/src/termios.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable

pub(crate) use self::termios::make_module;

Expand Down
2 changes: 1 addition & 1 deletion stdlib/src/tkinter.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:ignore createcommand
// spell-checker:ignore createcommand

pub(crate) use self::_tkinter::make_module;

Expand Down
4 changes: 2 additions & 2 deletions vm/src/builtins/genericalias.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:ignore iparam
// spell-checker:ignore iparam
use std::sync::LazyLock;

use super::type_;
Expand Down Expand Up @@ -590,7 +590,7 @@ impl Representable for PyGenericAlias {

impl Iterable for PyGenericAlias {
// ga_iter
// cspell:ignore gaiterobject
// spell-checker:ignore gaiterobject
// TODO: gaiterobject
fn iter(zelf: PyRef<Self>, vm: &VirtualMachine) -> PyResult {
// CPython's ga_iter creates an iterator that yields one starred GenericAlias
Expand Down
10 changes: 5 additions & 5 deletions vm/src/builtins/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ impl PyStr {
fn _compute_hash(&self, vm: &VirtualMachine) -> hash::PyHash {
let hash_val = vm.state.hash_secret.hash_bytes(self.as_bytes());
debug_assert_ne!(hash_val, hash::SENTINEL);
// cspell:ignore cmpxchg
// spell-checker:ignore cmpxchg
// like with char_len, we don't need a cmpxchg loop, since it'll always be the same value
self.hash.store(hash_val, atomic::Ordering::Relaxed);
hash_val
Expand Down Expand Up @@ -2263,9 +2263,9 @@ mod tests {
("Format This As Title String", "fOrMaT thIs aS titLe String"),
("Format,This-As*Title;String", "fOrMaT,thIs-aS*titLe;String"),
("Getint", "getInt"),
// cspell:disable-next-line
// spell-checker:disable-next-line
("Greek Ωppercases ...", "greek ωppercases ..."),
// cspell:disable-next-line
// spell-checker:disable-next-line
("Greek ῼitlecases ...", "greek ῳitlecases ..."),
];
for (title, input) in tests {
Expand All @@ -2280,9 +2280,9 @@ mod tests {
"A Titlecased Line",
"A\nTitlecased Line",
"A Titlecased, Line",
// cspell:disable-next-line
// spell-checker:disable-next-line
"Greek Ωppercases ...",
// cspell:disa 10000 ble-next-line
// spell-checker:disable-next-line
"Greek ῼitlecases ...",
];

Expand Down
2 changes: 1 addition & 1 deletion vm/src/builtins/super.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:ignore cmeth
// spell-checker:ignore cmeth
/*! Python `super` class.

See also [CPython source code.](https://github.com/python/cpython/blob/50b48572d9a90c5bb36e2bef6179548ea927a35a/Objects/typeobject.c#L7663)
Expand Down
2 changes: 1 addition & 1 deletion vm/src/bytes_inner.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:ignore unchunked
// spell-checker:ignore unchunked
use crate::{
AsObject, PyObject, PyObjectRef, PyPayload, PyResult, TryFromBorrowedObject, VirtualMachine,
anystr::{self, AnyStr, AnyStrContainer, AnyStrWrapper},
Expand Down
2 changes: 1 addition & 1 deletion vm/src/stdlib/ctypes.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable

pub(crate) mod array;
pub(crate) mod base;
Expand Down
2 changes: 1 addition & 1 deletion vm/src/stdlib/ctypes/function.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable

use crate::builtins::{PyStr, PyTupleRef, PyTypeRef};
use crate::convert::ToPyObject;
Expand Down
2 changes: 1 addition & 1 deletion vm/src/stdlib/errno.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable

use crate::{PyRef, VirtualMachine, builtins::PyModule};

Expand Down
2 changes: 1 addition & 1 deletion vm/src/stdlib/marshal.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:ignore pyfrozen pycomplex
// spell-checker:ignore pyfrozen pycomplex
pub(crate) use decl::make_module;

#[pymodule(name = "marshal")]
Expand Down
2 changes: 1 addition & 1 deletion vm/src/stdlib/msvcrt.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable

pub use msvcrt::*;

Expand Down
2 changes: 1 addition & 1 deletion vm/src/stdlib/nt.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable

use crate::{PyRef, VirtualMachine, builtins::PyModule};

Expand Down
2 changes: 1 addition & 1 deletion vm/src/stdlib/os.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable

use crate::{
AsObject, Py, PyPayload, PyResult, VirtualMachine,
Expand Down
2 changes: 1 addition & 1 deletion vm/src/stdlib/posix.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable

use crate::{PyRef, VirtualMachine, builtins::PyModule};
use std::os::unix::io::RawFd;
Expand Down
2 changes: 1 addition & 1 deletion vm/src/stdlib/posix_compat.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable

//! `posix` compatible module for `not(any(unix, windows))`
use crate::{PyRef, VirtualMachine, builtins::PyModule};
Expand Down
2 changes: 1 addition & 1 deletion vm/src/stdlib/pwd.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable

pub(crate) use pwd::make_module;

Expand Down
2 changes: 1 addition & 1 deletion vm/src/stdlib/signal.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable

use crate::{PyRef, VirtualMachine, builtins::PyModule};

Expand Down
2 changes: 1 addition & 1 deletion vm/src/stdlib/typevar.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:ignore typevarobject funcobj
// spell-checker:ignore typevarobject funcobj
use crate::{
AsObject, PyObject, PyObjectRef, PyPayload, PyRef, PyResult, VirtualMachine,
builtins::{PyTupleRef, PyTypeRef, pystr::AsPyStr},
Expand Down
2 changes: 1 addition & 1 deletion vm/src/stdlib/typing.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:ignore typevarobject funcobj
// spell-checker:ignore typevarobject funcobj
use crate::{PyPayload, PyRef, VirtualMachine, class::PyClassImpl, stdlib::PyModule};

pub use crate::stdlib::typevar::{
Expand Down
2 changes: 1 addition & 1 deletion vm/src/stdlib/winapi.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable

#![allow(non_snake_case)]
pub(crate) use _winapi::make_module;
Expand Down
2 changes: 1 addition & 1 deletion vm/src/stdlib/winreg.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable
#![allow(non_snake_case)]

use crate::{PyRef, VirtualMachine, builtins::PyModule};
Expand Down
4 changes: 2 additions & 2 deletions vm/src/vm/setting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ pub struct Settings {
/// sys.argv
pub argv: Vec<String>,

// cspell:ignore Xfoo
// spell-checker:ignore Xfoo
/// -Xfoo[=bar]
pub xoptions: Vec<(String, Option<String>)>,

// cspell:ignore Wfoo
// spell-checker:ignore Wfoo
/// -Wfoo
pub warnoptions: Vec<String>,

Expand Down
2 changes: 1 addition & 1 deletion vm/sre_engine/tests/tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable
use rustpython_sre_engine::{Request, State, StrDrive};

struct Pattern {
Expand Down
2 changes: 1 addition & 1 deletion wtf8/src/core_char.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable
//! Unstable functions from [`core::char`]

use core::slice;
Expand Down
2 changes: 1 addition & 1 deletion wtf8/src/core_str_count.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable
//! Modified from core::str::count

use super::Wtf8;
Expand Down
2 changes: 1 addition & 1 deletion wtf8/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cspell:disable
// spell-checker:disable

//! An implementation of [WTF-8], a utf8-compatible encoding that allows for
//! unpaired surrogate codepoints. This implementation additionally allows for
Expand Down
Loading
0