-
Notifications
You must be signed in to change notification settings - Fork 1.3k
use Initiailizer for PyStaticMethod #3742
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
running cargo fmt --all
will fix the fmt failure
vm/src/builtins/staticmethod.rs
Outdated
fn init(zelf: PyRef<Self>, args: Self::Args, vm: &VirtualMachine) -> PyResult<()> { | ||
zelf.as_object() | ||
.set_attr("__doc__", args.get_attr("__doc__", vm)?, vm)?; | ||
// zelf.as_object().set_attr("__format__", args.get_attr("__format__", vm)?, vm); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// zelf.as_object().set_attr("__format__", args.get_attr("__format__", vm)?, vm); |
And it seems |
Now that #3747 has been merged, can this be rebased on a fresh copy of the |
9c45229
to
e95efeb
Compare
vm/src/builtins/staticmethod.rs
Outdated
zelf.as_object() | ||
.set_attr("__doc__", args.get_attr("__doc__", vm)?, vm)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not a fix. func object need to be replaced, not doc.
e95efeb
to
849b81e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no behavior changed but harmless and preparation for next step
No description provided.