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

Add formatters for linter errors, files, and reports #2092

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Anastasiia-Chikrizova
Copy link

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Great job on implementing the task requirements! 🎉 Your code is well-structured and meets all the specified criteria. While there is a minor redundancy in the format_single_linter_file function, it doesn't affect the functionality. For future improvements, consider using the format_linter_error function to streamline your code and adhere to the DRY principle. Keep up the excellent work! 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

Comment on lines +13 to +19
"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.

The logic for formatting each error in format_single_linter_file is identical to the format_linter_error function. To adhere to the DRY (Don't Repeat Yourself) principle, consider using format_linter_error(error) here instead of manually formatting each error.

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