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

Code in name().method(kwargs=...) form not detected #44

Closed
gousaiyang opened this issue Sep 20, 2020 · 2 comments
Closed

Code in name().method(kwargs=...) form not detected #44

gousaiyang opened this issue Sep 20, 2020 · 2 comments

Comments

@gousaiyang
Copy link
Contributor

gousaiyang commented Sep 20, 2020

There are three slightly different code snippets, triggering different detection behaviors of vermin:

from zipfile import ZipFile
ZipFile.writestr(compress_type=None)

Correct: detected as 2.7+, 3.2+

from zipfile import ZipFile
ZipFile().writestr(compress_type=None)

Wrong: detected as ~2, ~3

from zipfile import ZipFile
zf = ZipFile()
zf.writestr(compress_type=None)

Correct: detected as 2.7+, 3.2+

However if the rule is not a kwargs rule, this bug does not happen:

from zipfile import ZipFile
ZipFile.setpassword()
from zipfile import ZipFile
ZipFile().setpassword()
from zipfile import ZipFile
zf = ZipFile()
zf.setpassword()

All these three cases are correctly detected as 2.6+, 3.0+.

Environment

  • Vermin version 0.10.3
@netromdk
Copy link
Owner

Thanks for letting me know. I will look into it.

@netromdk
Copy link
Owner

Alright, it's fixed :)

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