mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Change kind identifier to fully use python terminology
This commit is contained in:
1 parent
b5dc5a28e7
commit
ce9a909b9d
3 files changed
+8
-8
No files matched your search
+3
-3
@@ -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")
|
||||
|
||||
+3
-3
@@ -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<PyStringRef>,
|
||||
#[pyarg(keyword, default = "None")]
|
||||
#[pyarg(keyword_only, default = "None")]
|
||||
end: Option<PyStringRef>,
|
||||
#[pyarg(keyword, default = "false")]
|
||||
#[pyarg(keyword_only, default = "false")]
|
||||
flush: bool,
|
||||
}
|
||||
|
||||
|
||||
@@ -374,9 +374,9 @@ impl PyIntRef {
|
||||
|
||||
#[derive(FromArgs)]
|
||||
struct IntOptions {
|
||||
#[pyarg(positional, optional = true)]
|
||||
#[pyarg(positional_only, optional = true)]
|
||||
val_options: OptionalArg<PyObjectRef>,
|
||||
#[pyarg(positional_keyword, optional = true)]
|
||||
#[pyarg(positional_or_keyword, optional = true)]
|
||||
base: OptionalArg<u32>,
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user