mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 06:11:21 +00:00
Don't enforce object-without-hash-method
in stubs (#15310)
## Summary Closes https://github.com/astral-sh/ruff/issues/15292.
This commit is contained in:
parent
5e9259c96c
commit
75a24bbc67
1 changed files with 3 additions and 0 deletions
|
@ -111,6 +111,9 @@ impl Violation for EqWithoutHash {
|
|||
|
||||
/// W1641
|
||||
pub(crate) fn object_without_hash_method(checker: &mut Checker, class: &StmtClassDef) {
|
||||
if checker.source_type.is_stub() {
|
||||
return;
|
||||
}
|
||||
let eq_hash = EqHash::from_class(class);
|
||||
if matches!(
|
||||
eq_hash,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue