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 GitHub annotations format for --output #17771

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

Conversation

edgarrmondragon
Copy link
Contributor

@edgarrmondragon edgarrmondragon commented Sep 13, 2024

Adds a new output format as GitHub Workflow commands, aka annotations.

Refs:

Closes #17612

@edgarrmondragon edgarrmondragon force-pushed the 17612-github-annotations-output-format branch 3 times, most recently from 21efb22 to 70c8feb Compare September 13, 2024 22:36

This comment has been minimized.

@Seluj78
Copy link

Seluj78 commented Sep 17, 2024

I would love to see this merged, many people asked for it in #10816 and #14962 !

@edgarrmondragon edgarrmondragon force-pushed the 17612-github-annotations-output-format branch from 70c8feb to b330d80 Compare September 17, 2024 21:09

This comment has been minimized.

@A5rocks
Copy link
Contributor

A5rocks commented Sep 27, 2024

I assume this no longer needs to be marked as a draft?

@edgarrmondragon
Copy link
Contributor Author

I assume this no longer needs to be marked as a draft?

I've got a TODO comment in the diff that I want to address before opening the PR for review.

@edgarrmondragon edgarrmondragon force-pushed the 17612-github-annotations-output-format branch from b330d80 to e03e7f1 Compare September 27, 2024 17:35

This comment has been minimized.

@edgarrmondragon edgarrmondragon force-pushed the 17612-github-annotations-output-format branch from b335987 to fcdfa8f Compare September 27, 2024 18:05
Comment on lines +42 to +44
::notice file=main,line=12,col=12,title=Mypy (misc)::Revealed type is "Overload(def (), def (x: builtins.int))".
::error file=main,line=14,col=0,title=Mypy (call-overload)::No overload variant of "foo" matches argument type "str".%0A%0APossible overload variants:%0A def foo() -> None%0A def foo(x: int) -> None
::error file=main,line=17,col=0,title=Mypy (call-arg)::Too many arguments for "bar".
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here's how these look like in the diff view:

Screenshot 2024-09-27 at 12 07 56 p m

Copy link

Choose a reason for hiding this comment

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

Looks amazing!

@edgarrmondragon edgarrmondragon marked this pull request as ready for review September 27, 2024 18:10
@@ -530,11 +530,7 @@ def add_invertible_flag(
)

general_group.add_argument(
"-O",
"--output",
metavar="FORMAT",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was preventing the choices from being displayed in the --help output

This comment has been minimized.

@edgarrmondragon edgarrmondragon force-pushed the 17612-github-annotations-output-format branch from fcdfa8f to f22bffa Compare October 8, 2024 06:25
Copy link
Contributor

github-actions bot commented Oct 8, 2024

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

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.

Add a new output format option to print errors as GitHub Actions Workflow commands
3 participants