Support glob patterns in pep8_naming ignore-names (#5024)
## Summary Support glob patterns in pep8_naming ignore-names. Closes #2787 ## Test Plan Added new tests.
This commit is contained in:
@@ -5,6 +5,7 @@ use std::hash::{Hash, Hasher};
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use glob::Pattern;
|
||||
use itertools::Itertools;
|
||||
use regex::Regex;
|
||||
|
||||
@@ -375,3 +376,9 @@ impl CacheKey for Regex {
|
||||
self.as_str().cache_key(state);
|
||||
}
|
||||
}
|
||||
|
||||
impl CacheKey for Pattern {
|
||||
fn cache_key(&self, state: &mut CacheKeyHasher) {
|
||||
self.as_str().cache_key(state);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user