The older version of pylint being used does not work correctly under
python 3. In order to be able to update the pylint job to run under
python 3, we need to update the tool.
This patch updates to the latest version at this time. It also updates
and pins astroid, which was previously capped. Using a pin instead of
a cap should let us avoid issues with new releases while being
specific about which version to actually use.
The import-error linter rule is disabled because it appears in
Windows-related code that looks for modules we don't expect to be able
to find on the CI system under Linux.
The non-iterator-returned rule is disabled because it is erroring on a
class that doesn't make sense (freezer.utils.utils.ReSizeStream does
appear to honor the iterator protocol). Further investigation is
probably warranted on this one.
The public entry point for multiprocessing.SimpleQueue is the
top-level multiprocessing module, not multiprocessing.queues. The
linter correctly caught this error because the ctx argument was not
being passed to the class. The fix is to use the top-level entry point
to access the class.
basestring is no longer defined under python 3. The fix is to use
six.string_types, which correctly sets the alias to str or
basestring. By using the library, we can avoid having to tell the
linter to ignore the local customization.
The linter also caught a base raise, without an exception specified
and not in the context of an exception handler. I added an exception
using the pattern from the one on an earlier line.
Signed-off-by: Doug Hellmann <email@example.com>
Co-Authored-By: Nguyen Hai <firstname.lastname@example.org>
Added pylint checks. Fixed import error during python-novaclient import.
Finally pylint checks are executed now during the build.
Currently, as pylint is just enabled, checks for
Warnings, Refactor, Convention are disabled.
Closes bug: 1465063