Supress clippy lint that doesn't work

This commit is contained in:
carbotaniuman committed 2020-11-11 19:17:39 -06:00
1 parent 1aa603ac6a
commit 3a45839e01
3 files changed
+8 -9

No files matched your search

+4 -6
View File
@@ -521,20 +521,18 @@ mod decl {
let default = args.take_keyword("default");
let mut key_func = args.take_keyword("key");
match args.check_kwargs_empty(vm) {
Some(err) => return Err(err),
None => {}
if let Some(err) = args.check_kwargs_empty(vm) {
return Err(err);
}
if !default_allowed && default.is_some() {
if default.is_some() && !default_allowed {
return Err(vm.new_type_error(
"Specifying default not allowed with more than 1 argument".to_owned(),
));
}
if candidates.is_empty() {
return default
.ok_or_else(|| vm.new_value_error("min() arg is an empty sequence".to_owned()));
return default.ok_or_else(|| vm.new_value_error("min() arg is an empty sequence".to_owned()));
}
if let Some(ref obj) = key_func {
+2 -3
View File
@@ -197,9 +197,8 @@ impl FuncArgs {
given_args,
)))
} else {
match self.check_kwargs_empty(vm) {
Some(err) => return Err(err),
None => {}
if let Some(err) = self.check_kwargs_empty(vm) {
return Err(err);
}
Ok(bound)
}
+2
View File
@@ -7,6 +7,8 @@
// for methods like vm.to_str(), not the typical use of 'to' as a method prefix
#![allow(clippy::wrong_self_convention, clippy::implicit_hasher)]
// clippy warns on this for macro generated code rust-clippy/issues/6249
#![allow(clippy::suspicious_else_formatting)]
// to allow `mod foo {}` in foo.rs; clippy thinks this is a mistake/misunderstanding of
// how `mod` works, but we want this sometimes for pymodule declarations
#![allow(clippy::module_inception)]