Skip to content

Commit

Permalink
Respect ignores for runtime-import-in-type-checking-block (TCH004) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh authored Mar 13, 2023
1 parent cd192ed commit 8955e32
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/ruff/src/checkers/ast/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 8955e32

Please sign in to comment.