Skip to content

Commit

Permalink
Formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
Professor-Douel committed Nov 27, 2024
1 parent 2cd836b commit 48852ec
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions app/main.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
def format_linter_error(error: dict) -> dict:
# write your code here
return {
"line": error["line_number"],
"column": error["column_number"],
"message": error["text"],
"name": error["filename"],
"source": "flake8"
}
pass


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


def format_linter_report(linter_report: dict) -> list:
# write your code here
return [
(file_path, errors) for file_path, errors in linter_report.items()
]
pass

0 comments on commit 48852ec

Please sign in to comment.