Closed ninoseki closed 1 year ago
I had to revert this change because the test suite started failing. First it was the linter:
Run pylint --rcfile pylintrc vt/ tests examples/
************* Module vt.client
vt/client.py:382:12: E[11](https://github.com/VirusTotal/vt-py/actions/runs/6129601871/job/16637863581#step:5:12)36: Value 'list' is unsubscriptable (unsubscriptable-object)
vt/client.py:404:[12](https://github.com/VirusTotal/vt-py/actions/runs/6129601871/job/16637863581#step:5:13): E1[13](https://github.com/VirusTotal/vt-py/actions/runs/6129601871/job/16637863581#step:5:14)6: Value 'list' is unsubscriptable (unsubscriptable-object)
I thought it was just a linting issue, but after disabling the unsubscriptable-object
, it started failing while running the tests:
tests/test_iterator.py:19: in <module>
import vt
vt/__init__.py:17: in <module>
from .client import *
vt/client.py:177: in <module>
class Client:
vt/client.py:385: in Client
sleep_time: int = 20
E TypeError: 'type' object is not subscriptable
I'm not sure what's happening here, the error message is quite confusing.
@plusvic Sorry it's totally my bad that I didn't test the PR with Python 3.7 and didn't apply pylint
in tests
directory. (I just did pylint vt/
)
I fixed the issue my PR has and now all tests are green. Is it okay to re-create PR again?
hello @ninoseki,
Please, recreate the PR.
Thanks!
Thanks I re-created the PR as #161.
I re-created #43 because it becomes too old.
I believe adding type hints enhances vt-py's user experience. So I'd appreciate if you could give your time to review this PR.
For example,
Before
obj
from the iterator isUnknown
.After
obj
from the iterator isObject
.Thus IDE can suggest auto-completion.