Skip to content

Commit

Permalink
Fix error from ignored file with Ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Feb 3, 2025
1 parent 224fc52 commit 017913f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions prospector/tools/ruff/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json
import subprocess # nosec
from pathlib import Path
from typing import TYPE_CHECKING, Any

from ruff.__main__ import find_ruff_bin
Expand Down Expand Up @@ -65,6 +66,8 @@ def run(self, found_files: FileFinder) -> list[Message]:
if sub_message:
message_str += f" [{', '.join(f'{k}: {v}' for k, v in sub_message.items())}]"

if message.get("filename") is None or found_files.is_excluded(Path(message.get("filename"))):
continue
messages.append(
Message(
"ruff",
Expand Down

0 comments on commit 017913f

Please sign in to comment.