Skip to content

Tabs replaced by '?' in HTML/XML reports #5942

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

Closed
mthuurne opened this issue Nov 23, 2018 · 3 comments
Closed

Tabs replaced by '?' in HTML/XML reports #5942

mthuurne opened this issue Nov 23, 2018 · 3 comments

Comments

@mthuurne
Copy link
Contributor

When I generate an HTML or XML report with mypy, in the annotated code all tabs have been replaced by question marks. It is not just the web browser showing a question mark for an unknown character: there are literal question marks (ASCII 63) in the output.

The progress message says HTML reports are generated via XSLT, so I guess the HTML reports inherit this behavior from the XML reports.

I know that PEP8 states spaces should be used for new code, but it would be nice if mypy could be used on legacy code bases as well.

I'm using a mypy dev snapshot (0.650+) on Python 3.6.5.

@ilevkivskyi
Copy link
Member

I think we can support this. Would you like to make a PR?

mthuurne added a commit to mthuurne/mypy that referenced this issue Nov 23, 2018
Control characters are replaced with question marks, to avoid
outputting invalid XML. However, XML does allow tabs in content,
so make an exception for those.
@mthuurne
Copy link
Contributor Author

PR created: #5945

mthuurne added a commit to mthuurne/mypy that referenced this issue Nov 23, 2018
Control characters are replaced with question marks, to avoid
outputting invalid XML. However, XML does allow tabs in content,
so make an exception for those.
gvanrossum pushed a commit that referenced this issue Nov 24, 2018
Control characters are replaced with question marks, to avoid
outputting invalid XML. However, XML does allow tabs in content,
so make an exception for those.
@gvanrossum
Copy link
Member

Thanks for the fix! (Next time put "Fixes #5942" in the commit message, instead of in the title.)

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

3 participants