Respect ignores for runtime-import-in-type-checking-block (TCH004) (#3474)

This commit is contained in:
Charlie Marsh 2023-03-12 22:23:26 -04:00 committed by GitHub
parent cd192eddf9
commit 8955e32b5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -4971,7 +4971,9 @@ impl<'a> Checker<'a> {
if let Some(diagnostic) =
flake8_type_checking::rules::runtime_import_in_type_checking_block(binding)
{
diagnostics.push(diagnostic);
if self.settings.rules.enabled(diagnostic.kind.rule()) {
diagnostics.push(diagnostic);
}
}
if let Some(diagnostic) =
flake8_type_checking::rules::typing_only_runtime_import(