diff --git a/derive/src/lib.rs b/derive/src/lib.rs index b4048ec83..8f15f0e87 100644 --- a/derive/src/lib.rs +++ b/derive/src/lib.rs @@ -23,11 +23,11 @@ enum ParameterKind { impl ParameterKind { fn from_ident(ident: &Ident) -> ParameterKind { - if ident == "positional" { + if ident == "positional_only" { ParameterKind::PositionalOnly - } else if ident == "positional_keyword" { + } else if ident == "positional_or_keyword" { ParameterKind::PositionalOrKeyword - } else if ident == "keyword" { + } else if ident == "keyword_only" { ParameterKind::KeywordOnly } else { panic!("Unrecognised attribute") diff --git a/vm/src/builtins.rs b/vm/src/builtins.rs index 3a695c517..ed656c0fb 100644 --- a/vm/src/builtins.rs +++ b/vm/src/builtins.rs @@ -537,11 +537,11 @@ fn builtin_pow(vm: &VirtualMachine, args: PyFuncArgs) -> PyResult { #[derive(Debug, FromArgs)] pub struct PrintOptions { - #[pyarg(keyword, default = "None")] + #[pyarg(keyword_only, default = "None")] sep: Option, - #[pyarg(keyword, default = "None")] + #[pyarg(keyword_only, default = "None")] end: Option, - #[pyarg(keyword, default = "false")] + #[pyarg(keyword_only, default = "false")] flush: bool, } diff --git a/vm/src/obj/objint.rs b/vm/src/obj/objint.rs index 0fad52907..08175dc07 100644 --- a/vm/src/obj/objint.rs +++ b/vm/src/obj/objint.rs @@ -374,9 +374,9 @@ impl PyIntRef { #[derive(FromArgs)] struct IntOptions { - #[pyarg(positional, optional = true)] + #[pyarg(positional_only, optional = true)] val_options: OptionalArg, - #[pyarg(positional_keyword, optional = true)] + #[pyarg(positional_or_keyword, optional = true)] base: OptionalArg, }