[flake8-type-checking] Improve flexibility of runtime-evaluated-decorators (#15204)

Co-authored-by: Micha Reiser <micha@reiser.io>
This commit is contained in:
David Salvisberg 2024-12-31 17:28:10 +01:00 committed by GitHub
parent 7ca3f9515c
commit 1ef0f615f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 192 additions and 10 deletions

View file

@ -277,6 +277,14 @@ impl<'a> QualifiedName<'a> {
inner.push(member);
Self(inner)
}
/// Extends the qualified name using the given members.
#[must_use]
pub fn extend_members<T: IntoIterator<Item = &'a str>>(self, members: T) -> Self {
let mut inner = self.0;
inner.extend(members);
Self(inner)
}
}
impl Display for QualifiedName<'_> {