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 more fields in messages #713

Merged
merged 1 commit into from
Jan 20, 2025
Merged

Add more fields in messages #713

merged 1 commit into from
Jan 20, 2025

Conversation

sbrunner
Copy link
Member

Description

Add more fields in the messages

Related Issue

#708

Motivation and Context

Have more information useful to implement a VS Code extension to display the error in the IDE.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@sbrunner sbrunner force-pushed the improve-messages branch 3 times, most recently from 87bfa35 to 2669de0 Compare January 19, 2025 09:58
@sbrunner sbrunner marked this pull request as ready for review January 19, 2025 16:09
),
message_str,
doc_url=message.get("url"),
is_fixable=bool((message.get("fix") or {}).get("applicability") in ("safe", "unsafe")),
Copy link
Member

@carlio carlio Jan 19, 2025

Choose a reason for hiding this comment

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

I think this could be a bit cleaner -

message.get("fix", {}) instead of message.get("fix") or {}

but also moving the whole thing onto a separate line just to make it clearer

Copy link
Member Author

Choose a reason for hiding this comment

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

Your proposition is my initial code, but it's not working because fix is not missing but is None!

@carlio
Copy link
Member

carlio commented Jan 19, 2025

Mild nitpick above but otherwise seems good to me

Copy link
Collaborator

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

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

Nice catch up with the pylint feature !

@sbrunner sbrunner merged commit f9b703e into master Jan 20, 2025
5 checks passed
@sbrunner sbrunner deleted the improve-messages branch January 23, 2025 11:26
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