-
Notifications
You must be signed in to change notification settings - Fork 25
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
Check for number of detected minimum versions seems not useful #79
Comments
Thanks for reaching out. For context, via
The result of
means that it doesn't have any evidence that it won't work with v2.x and v3.x - the file is empty. It doesn't mean that it infers it can run on v2.x and v3.x. Btw it also exits with code But as soon as any data is found it can then conclude that it's not compatible with v2.x and requires v3.6+ via "bar.py". Would it be more clear if it showed an extra note at the end when having either ~2 and/or ~3, like the following?
And then maybe not showing
when having ~2 and/or ~3 - that doesn't make much sense since those are things it cannot conclude on concretely. So wrapping up, your first run on "foo.py" could then yield the following to be more clear:
Interesting idea to use on Git pre-commit. Should work fine. If your target version is violated, it'll exit with |
We document a minimum required Python version and I would like to check that no newer language features are used. I understand the diagnostic messages, but the way return codes are computed seems to break that workflow. To recap, what I would like to do:
The way I understood the flags, I think this would work if Or is there some other way to do what I am after? |
Indeed for backwards compatibility, I think it makes most sense to make this change for when using For your two scenarios, it now yields:
|
… 0 (#79) If no rules are triggered the minimum versions detected will be ~2 and ~3, which means nothing conclusive can be determined and thus the target violation shouldn't mean exit code 1.
@bbannier v1.3.1 has been released. |
Describe the bug
If I run
vermin
with flags requiring a single minimum version on a file that supports multiple versions a warning is triggered. This warning doesn't seem useful.The issue goes away if I actually add a file removing
2
from the minimum required set,The warning when running over a single file does not seem useful and even potentially harmful.
Expected behavior
I would like to configure
vermin
for pre-commit. For each Git commit pre-commit runs on the set of changed files. I had expected that I can configurevermin
in a way so that violations of a single file are a subset of the violations of all files. The current behavior seems to be the opposite.Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: