Skip to content

Commit 6db6c60

Browse files
committed
Update staticmethod.rs
1 parent 8fce0e3 commit 6db6c60

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

vm/src/builtins/staticmethod.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ use crate::{
44
class::PyClassImpl,
55
function::{FuncArgs, IntoPyNativeFunc},
66
types::{Callable, Constructor, GetDescriptor, Initializer},
7-
Context, PyObjectRef, PyPayload, PyRef, PyResult, VirtualMachine,
8-
AsObject
7+
AsObject, Context, PyObjectRef, PyPayload, PyRef, PyResult, VirtualMachine,
98
};
109

1110
#[pyclass(module = false, name = "staticmethod")]
@@ -67,13 +66,17 @@ impl Initializer for PyStaticMethod {
6766
type Args = PyObjectRef;
6867

6968
fn init(zelf: PyRef<Self>, args: Self::Args, vm: &VirtualMachine) -> PyResult<()> {
70-
zelf.as_object().set_attr("__doc__", args.get_attr("__doc__", vm)?, vm)?;
69+
zelf.as_object()
70+
.set_attr("__doc__", args.get_attr("__doc__", vm)?, vm)?;
7171
// zelf.as_object().set_attr("__format__", args.get_attr("__format__", vm)?, vm);
7272
Ok(())
7373
}
7474
}
7575

76-
#[pyimpl(with(Callable, GetDescriptor, Constructor, Initializer), flags(BASETYPE, HAS_DICT))]
76+
#[pyimpl(
77+
with(Callable, GetDescriptor, Constructor, Initializer),
78+
flags(BASETYPE, HAS_DICT)
79+
)]
7780
impl PyStaticMethod {
7881
#[pyproperty(magic)]
7982
fn isabstractmethod(&self, vm: &VirtualMachine) -> PyObjectRef {

0 commit comments

Comments
 (0)