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

Show [mypy] in reportinfo #187

Open
jaredahern opened this issue Nov 23, 2024 · 2 comments
Open

Show [mypy] in reportinfo #187

jaredahern opened this issue Nov 23, 2024 · 2 comments

Comments

@jaredahern
Copy link

Hi! With other pytest plugins that I'm familiar with, the base tool name is shown in the reportinfo header for files. I think this helps a user to parse the output. For example, pytest-pylint shows:

____________ [pylint] path/to/file.py ______________

However, pytest-mypy doesn't show "[mypy]", just the file path (tested with pytest-pylint 0.10.3 and pytest 8.3.3). I think this used to be shown, but this was lost in this commit. Or perhaps the add_marker() call should do this, but doesn't seem to; I haven't dug deeply into that.

Could this be restored please? I think all that is needed is to prepend "[mypy] " to the third item in the return tuple from MypyFileItem.reportinfo(), unless the add_marker machinery needs to be modified, and/or tests added. Happy to submit a PR if desired.

@dmtucker
Copy link
Collaborator

Hey, thanks for reaching out!
Sure, we can restore that 👍 Moreover, let's add a way for customize the header so anyone can make it show whatever they want.

@jaredahern
Copy link
Author

That's great, thank you! Do you need a PR or anything from me?

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

No branches or pull requests

2 participants