Skip to content

Commit

Permalink
fix flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
dkornit committed Oct 2, 2024
1 parent 27236c8 commit b33214f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ def format_linter_error(error: dict) -> dict:
"source": "flake8"
}


def format_single_linter_file(file_path: str, errors: list) -> dict:
return {
return {
"errors": [format_linter_error(error) for error in errors],
"path": file_path,
"status": "failed" if errors else "passed"
}


def format_linter_report(linter_report: dict) -> list:
return [
format_single_linter_file(file_path, errors)
for file_path, errors in linter_report.items()
]

0 comments on commit b33214f

Please sign in to comment.