Skip to content

Commit

Permalink
fixed flake8 errors, final solution
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey committed Nov 11, 2024
1 parent e303148 commit 42e5feb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ def format_linter_error(error: dict) -> dict:
"name": error["code"],
"source": "flake8"
}


def format_single_linter_file(file_path: str, errors: list) -> dict:
return {
"errors":
Expand All @@ -22,6 +24,8 @@ def format_single_linter_file(file_path: str, errors: list) -> dict:
"path": file_path,
"status": "failed" if errors else "passed"
}


def format_linter_report(linter_report: dict) -> list:
return [
{
Expand All @@ -39,4 +43,4 @@ def format_linter_report(linter_report: dict) -> list:
"status": "failed" if errors else "passed"
}
for file_path, errors in linter_report.items()
]
]

0 comments on commit 42e5feb

Please sign in to comment.