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

Error reporting breaks parsable format #150

Closed
ThinLinc-Zeijlon opened this issue Feb 21, 2023 · 2 comments · Fixed by #156
Closed

Error reporting breaks parsable format #150

ThinLinc-Zeijlon opened this issue Feb 21, 2023 · 2 comments · Fixed by #156

Comments

@ThinLinc-Zeijlon
Copy link

Describe the bug
The error reporting in parser.py -> detect(self, config) breaks the parsable format that vermin outputs when using the argument --format parsable.

To Reproduce
Run vermin --format parsable foo.py

# foo.py
print("print)

The output line that reports information about the syntax error,

foo.py:1:7:~2, ~3:error: unterminated string literal (detected at line 1): print("print)

has a comma between the version tags.

Expected behavior
There should be a colon between the version tags.

Environment (please complete the following information):
version 1.5.1

Additional context
Can be solved by adding an additional argument ":" to version_strings on line 99 in parser.py

versions = version_strings(min_versions, ":") + ":" if parsable else ""
@netromdk
Copy link
Owner

netromdk commented Mar 1, 2023

Thank you for reporting this! I will look into this soon.

@netromdk
Copy link
Owner

netromdk commented Mar 2, 2023

It has been fixed now. Thanks again, @Cendio-Zeijlon!

Going to release 1.5.2 soonish.

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 a pull request may close this issue.

2 participants