You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
lint failure: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from) #1115
pylint seems to have been upgraded on travis -- or pip on python3.8 now installs pylint 2.6.0 based on the test output. This seems to make linter fail because of the added raise-missing-from check:
************* Module tuf.formats
/home/travis/build/theupdateframework/tuf/tuf/formats.py:958:4: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
/home/travis/build/theupdateframework/tuf/tuf/formats.py:964:4: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
************* Module tuf.repository_lib
/home/travis/build/theupdateframework/tuf/tuf/repository_lib.py:544:4: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
/home/travis/build/theupdateframework/tuf/tuf/repository_lib.py:573:4: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
/home/travis/build/theupdateframework/tuf/tuf/repository_lib.py:613:4: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
/home/travis/build/theupdateframework/tuf/tuf/repository_lib.py:669:4: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
************* Module tuf.keydb
/home/travis/build/theupdateframework/tuf/tuf/keydb.py:345:4: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
************* Module tuf.scripts.repo
/home/travis/build/theupdateframework/tuf/tuf/scripts/repo.py:458:6: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
************* Module tuf.client.updater
/home/travis/build/theupdateframework/tuf/tuf/client/updater.py:1589:10: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
We should consider "raise from" (although it's a bit of a pain with python2) or disable the linter check.
Activity
jku commentedon Aug 24, 2020
six.raise_from(exc_value, exc_value_from)is probably the reasonable choice: it keeps old functionality for py2 but uses 'raise from' on py3sechkova commentedon Aug 24, 2020
Thanks, @jku, six is already used in the project for python 2.x compatibility so it does seem the best fit.
I opened #1116 based on your suggestion.
lukpueh commentedon Aug 24, 2020
Kindly fixed in #1116. Thanks for the efforts @jku and @sechkova!