mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 14:51:25 +00:00
Avoid useless-import alias
(C0414
) in .pyi
files (#3761)
This commit is contained in:
parent
5cb120327c
commit
450c6780ff
1 changed files with 8 additions and 4 deletions
|
@ -942,8 +942,10 @@ where
|
|||
}
|
||||
|
||||
// pylint
|
||||
if self.settings.rules.enabled(Rule::UselessImportAlias) {
|
||||
pylint::rules::useless_import_alias(self, alias);
|
||||
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,8 +1421,10 @@ where
|
|||
}
|
||||
|
||||
// pylint
|
||||
if self.settings.rules.enabled(Rule::UselessImportAlias) {
|
||||
pylint::rules::useless_import_alias(self, alias);
|
||||
if !self.is_stub {
|
||||
if self.settings.rules.enabled(Rule::UselessImportAlias) {
|
||||
pylint::rules::useless_import_alias(self, alias);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue