-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
linter_formatter #1949
base: master
Are you sure you want to change the base?
linter_formatter #1949
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your hard work on this Pull Request! 😊 There are a couple of critical issues that need to be addressed before we can approve it. Firstly, there's a typographical error in the key name 'colum' which should be corrected to 'column' in both the format_linter_error
and format_single_linter_file
functions. This typo could lead to key errors during execution. Secondly, the logic for handling empty error lists in format_single_linter_file
is incorrect, as it will still iterate over the list even if it's empty. Please address these issues to ensure the code functions correctly. Keep up the great work, and don't hesitate to reach out if you need any help! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review
button in the Reviewers tab.
app/main.py
Outdated
|
||
return { | ||
"line": error["line_number"], | ||
"colum": error["column_number"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a typo in the key name 'colum'. It should be 'column' to match the expected key in the error dictionary.
app/main.py
Outdated
return { | ||
"errors": [{ | ||
"line": error["line_number"], | ||
"colum": error["column_number"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a typo in the key name 'colum'. It should be 'column' to match the expected key in the error dictionary.
app/main.py
Outdated
"message": error["text"], | ||
"name": error["code"], | ||
"source": "flake8" | ||
} if bool(errors) else [] for error in errors], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic here is incorrect. The list comprehension will still iterate over the errors list even if it's empty. Consider restructuring this logic to handle empty lists more effectively.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix flake8
errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good Job!
No description provided.