Skip to content

Commit

Permalink
exclude stub files from rule
Browse files Browse the repository at this point in the history
  • Loading branch information
augustelalande committed Feb 27, 2024
1 parent bed876c commit 4282d15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/ruff_linter/src/checkers/tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ pub(crate) fn check_tokens(
flake8_fixme::rules::todos(&mut diagnostics, &todo_comments);
}

if settings.rules.enabled(Rule::MissingClassNewLine) {
if !source_type.is_stub() && settings.rules.enabled(Rule::MissingClassNewLine) {
let mut blank_lines_checker = flake8_class_newline::rules::BlankLinesChecker::default();
blank_lines_checker.check_lines(
tokens,
Expand Down

0 comments on commit 4282d15

Please sign in to comment.