mirror of https://github.com/astral-sh/ruff
Avoid `useless-import alias` (`C0414`) in `.pyi` files (#3761)
This commit is contained in:
parent
5cb120327c
commit
450c6780ff
|
|
@ -942,9 +942,11 @@ where
|
|||
}
|
||||
|
||||
// pylint
|
||||
if !self.is_stub {
|
||||
if self.settings.rules.enabled(Rule::UselessImportAlias) {
|
||||
pylint::rules::useless_import_alias(self, alias);
|
||||
}
|
||||
}
|
||||
if self.settings.rules.enabled(Rule::ManualFromImport) {
|
||||
pylint::rules::manual_from_import(self, stmt, alias, names);
|
||||
}
|
||||
|
|
@ -1419,12 +1421,14 @@ where
|
|||
}
|
||||
|
||||
// pylint
|
||||
if !self.is_stub {
|
||||
if self.settings.rules.enabled(Rule::UselessImportAlias) {
|
||||
pylint::rules::useless_import_alias(self, alias);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
StmtKind::Raise { exc, .. } => {
|
||||
if self.settings.rules.enabled(Rule::RaiseNotImplemented) {
|
||||
if let Some(expr) = exc {
|
||||
|
|
|
|||
Loading…
Reference in New Issue