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:
Thomas de Zeeuw 2023-06-13 17:37:13 +02:00 committed by GitHub
parent 65312bad01
commit b0f89fa814
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 482 additions and 22 deletions

View file

@ -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);
}
}