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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ jobs:

- name: Check whats_left is not broken
shell: bash
run: python -I scripts/whats_left.py --rustpython target/release/rustpython
run: python -I scripts/whats_left.py --signature --rustpython target/release/rustpython

clippy:
# Named after the matrix entry rather than left to be named for it: a
Expand Down
13 changes: 11 additions & 2 deletions crates/stdlib/src/unicodedata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,22 @@ mod unicodedata {
}
}

#[pyfunction]
fn iter_graphemes(
#[derive(FromArgs)]
struct IterGraphemesArgs {
#[pyarg(positional)]
unistr: PyStrRef,
#[pyarg(positional, optional, py_default = "0")]
start: OptionalArg<PyObjectRef>,
#[pyarg(positional, optional, py_default = "sys.maxsize")]
end: OptionalArg<PyObjectRef>,
}

#[pyfunction]
fn iter_graphemes(
args: IterGraphemesArgs,
vm: &VirtualMachine,
) -> PyResult<crate::vm::PyRef<GraphemeBreakIterator>> {
let IterGraphemesArgs { unistr, start, end } = args;
// Convert in argument order, including overflow, before adjusting bounds.
let index = |arg: OptionalArg<PyObjectRef>, default| -> PyResult<isize> {
match arg {
Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/stdlib/_functools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ mod _functools {
function: PyObjectRef,
#[pyarg(positional)]
iterable: PyIter,
#[pyarg(any, optional)]
#[pyarg(any, optional, py_default = "functools._initial_missing")]
initial: OptionalOption<PyObjectRef>,
}

Expand Down
Loading