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

Failing on some mypy messages #339

Closed
rik opened this issue Jul 1, 2019 · 2 comments
Closed

Failing on some mypy messages #339

rik opened this issue Jul 1, 2019 · 2 comments

Comments

@rik
Copy link
Contributor

rik commented Jul 1, 2019

In my project, I ran into this error:

Traceback (most recent call last):
  File "venv/bin/prospector", line 10, in <module>
    sys.exit(main())
  File "venv/lib/python3.7/site-packages/prospector/run.py", line 173, in main
    prospector.execute()
  File "venv/lib/python3.7/site-packages/prospector/run.py", line 66, in execute
    messages += tool.run(found_files)
  File "venv/lib/python3.7/site-packages/prospector/tools/mypy/__init__.py", line 85, in run
    character=int(char),
ValueError: invalid literal for int() with base 10: ' note'

After digging a bit, I found that mypy can emit this kind of messages: file:9: note: unused 'type: ignore' comment and that https://github.com/PyCQA/prospector/blob/bf1930e7166012c84e730caa44fd43b3f852c876/prospector/tools/mypy/__init__.py#L79 can't handle this format.

@chocoelho
Copy link
Contributor

@rik what's mypy version you're using and can you provide an example so we can test it?

@rik
Copy link
Contributor Author

rik commented Jul 9, 2019

I've made a repository to ease testing

rik added a commit to rik/prospector that referenced this issue Jul 21, 2019
Extracts a `format_message` to help unit testing

fix prospector-dev#339
rik added a commit to rik/prospector that referenced this issue Jul 21, 2019
Extracts a `format_message` to help unit testing

fix prospector-dev#339
rik added a commit to rik/prospector that referenced this issue Jul 21, 2019
Extracts a `format_message` to help unit testing

fix prospector-dev#339
rik added a commit to rik/prospector that referenced this issue Jul 21, 2019
Extracts a `format_message` to help unit testing

fix prospector-dev#339
rik added a commit to rik/prospector that referenced this issue Jul 21, 2019
Extracts a `format_message` to help unit testing

fix prospector-dev#339
rik added a commit to rik/prospector that referenced this issue Jul 22, 2019
Extracts a `format_message` to help unit testing

fix prospector-dev#339
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