Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution #723

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

VolodymyrSeniv
Copy link

Have a nice day)

app/main.py Outdated
Comment on lines 3 to 6
"line": error["line_number"],
"column": error["column_number"],
"message": error["text"],
"name": error["code"],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's preferable to use get() method instead of parenthesis everywhere for getting value by key to avoid KeyError

app/main.py Outdated
Comment on lines 13 to 22
"errors": [
{
"line": error["line_number"],
"column": error["column_number"],
"message": error["text"],
"name": error["code"],
"source": "flake8"
}
for error in errors
],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use format_linter_error() function here

app/main.py Outdated
Comment on lines 30 to 43
{
"errors": [
{
"line": error["line_number"],
"column": error["column_number"],
"message": error["text"],
"name": error["code"],
"source": "flake8"
}
for error in file_errors
],
"path": file_path,
"status": "failed" if file_errors else "passed"
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use format_single_linter_file() function here

Copy link

@EdAlekseiev EdAlekseiev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants