X Tutup
Skip to content
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
3 changes: 3 additions & 0 deletions .cspell.dict/cpython.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ cellvar
cellvars
cmpop
denom
DICTFLAG
dictoffset
elts
excepthandler
Expand All @@ -28,6 +29,7 @@ heaptype
HIGHRES
IMMUTABLETYPE
Itertool
keeped
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for "keeped" in the codebase
rg -i "keeped" -C 2

Repository: RustPython/RustPython

Length of output: 47


Remove "keeped" from the dictionary.

The word "keeped" does not appear anywhere in the codebase and is not valid English (the past tense of "keep" is "kept"). This entry should be removed from .cspell.dict/cpython.txt.

🤖 Prompt for AI Agents
.cspell.dict/cpython.txt around line 32: remove the invalid dictionary entry
"keeped" from the file — open .cspell.dict/cpython.txt, delete the line
containing "keeped" (ensuring no leftover blank lines break formatting), save
the file, and commit the change so the misspelled past-tense entry is no longer
in the cspell dictionary.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coderabbitai Please make a new PR to address this issue.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fanninpm, I cannot create pull requests directly to the repository. However, I can create a GitHub issue to track this task as a follow-up action.

Would you like me to open an issue for removing the invalid dictionary entry "keeped" from .cspell.dict/cpython.txt? The issue would include:

  • The specific file and line that needs to be changed
  • The reason for removal (not valid English, doesn't appear in codebase)
  • A reference back to this PR and comment thread

Alternatively, if you prefer to handle this directly, the fix is straightforward:

  1. Open .cspell.dict/cpython.txt
  2. Remove line 32 containing "keeped"
  3. Save and commit the change

Please let me know how you'd like to proceed!

kwonlyarg
kwonlyargs
lasti
Expand All @@ -48,6 +50,7 @@ PYTHREAD_NAME
SA_ONSTACK
SOABI
stackdepth
stginfo
stringlib
structseq
subparams
Expand Down
19 changes: 16 additions & 3 deletions crates/vm/src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,23 @@ impl FormatCode {
_ => 1,
};

// Skip whitespace (Python ignores whitespace in format strings)
while let Some(b' ' | b'\t' | b'\n' | b'\r') = chars.peek() {
chars.next();
}

// determine format char:
let c = chars
.next()
.ok_or_else(|| "repeat count given without format specifier".to_owned())?;
let c = match chars.next() {
Some(c) => c,
None => {
// If we have a repeat count but only whitespace follows, error
if repeat != 1 {
return Err("repeat count given without format specifier".to_owned());
}
// Otherwise, we're done parsing
break;
}
};

// Check for embedded null character
if c == 0 {
Expand Down
Loading
X Tutup