mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Fix clippy lints
This commit is contained in:
@@ -281,7 +281,7 @@ fn type_new_slot(metatype: PyClassRef, args: PyFuncArgs, vm: &VirtualMachine) ->
|
||||
vm_trace!("type.__new__ {:?}", args);
|
||||
|
||||
if metatype.is(&vm.ctx.types.type_type) {
|
||||
if args.args.len() == 1 && args.kwargs.len() == 0 {
|
||||
if args.args.len() == 1 && args.kwargs.is_empty() {
|
||||
return Ok(args.args[0].class().into_object());
|
||||
}
|
||||
if args.args.len() != 3 {
|
||||
|
||||
@@ -637,6 +637,7 @@ fn ast_parse(source: PyStringRef, vm: &VirtualMachine) -> PyResult<AstNodeRef> {
|
||||
program_to_ast(&vm, &internal_ast)
|
||||
}
|
||||
|
||||
#[allow(clippy::cognitive_complexity)]
|
||||
pub fn make_module(vm: &VirtualMachine) -> PyObjectRef {
|
||||
let ctx = &vm.ctx;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user