mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 04:19:18 +00:00
[flake8-type-checking
] Improve flexibility of runtime-evaluated-decorators
(#15204)
Co-authored-by: Micha Reiser <micha@reiser.io>
This commit is contained in:
parent
7ca3f9515c
commit
1ef0f615f1
12 changed files with 192 additions and 10 deletions
|
@ -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<'_> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue