update to latest pylint (2.0.0) and appease it

This commit is contained in:
jab 2018-07-17 00:26:36 +00:00
parent 28a4936cbf
commit 20e1c18af1
8 changed files with 19 additions and 12 deletions

View File

@ -1,6 +1,7 @@
# https://docs.pylint.org/en/latest/technical_reference/features.html
[MESSAGES CONTROL]
disable = useless-object-inheritance
# bidict/_version.py is generated by setuptools_scm
ignore = _version.py

View File

@ -102,11 +102,11 @@ matrix:
- travis_retry make linkcheck
- env: TASK=flake8
before_install: skip
install: travis_retry pip install flake8
install: travis_retry pip install 'flake8<3.6' # keep in sync with the pin in setup.py
script: flake8 $LINT_SRC
- env: TASK=pylint
before_install: travis_retry pip install .[test]
install: travis_retry pip install pylint
before_install: skip
install: travis_retry pip install 'pylint<2.1' 'hypothesis<4' 'pytest<4' # keep in sync with the pins in setup.py
script: pylint --jobs=0 $LINT_SRC
- env: TASK=test-with-optimization-flag # make sure there are no relied-on side effects in assert statements
before_install: skip

View File

@ -114,7 +114,7 @@ class _Node(object): # pylint: disable=too-few-public-methods
vork = self._vork
if key_or_val == korv:
return vork
elif key_or_val == vork:
if key_or_val == vork:
return korv
raise KeyError(key_or_val)

View File

@ -82,7 +82,7 @@ if PY2:
# In Python 3, the collections ABCs were moved into collections.abc, which does not exist in
# Python 2. Support for importing them directly from collections is dropped in Python 3.8.
from collections import ( # noqa: F401 (imported but unused)
from collections import ( # pylint: disable=no-name-in-module; noqa: F401 (imported but unused)
Mapping, MutableMapping, KeysView, ItemsView)
else:

View File

@ -1,7 +1,7 @@
[aliases]
test=pytest
; https://flake8.readthedocs.io/en/latest/config.html
; http://flake8.pycqa.org/en/latest/user/configuration.html
[flake8]
ignore = E126,E128,E265,E731
max-line-length = 100

View File

@ -68,12 +68,12 @@ DOCS_REQS = [
DEV_REQ = SETUP_REQS + TEST_REQS + COVERAGE_REQS + DOCS_REQS + [
'pre-commit<2',
'tox<4',
# Peg to more specific versions of the following dependencies since they'd
# have a higher chance of breaking CI otherwise. Upgrade to newer versions
# manually to have a chance to fix any resulting breakage.
# The following dependencies have a higher chance of suddenly causing CI to fail after updating
# even between minor versions so pin to currently-working minor versions. Upgrade to newer
# minor versions manually to have a chance to fix any resulting breakage before it hits CI.
'flake8<3.6',
'pydocstyle<2.2',
'pylint<1.9',
'pylint<2.1',
]
setup(

View File

@ -7,7 +7,10 @@
"""Test various issubclass checks."""
from collections import Hashable
try:
from collections import Hashable
except ImportError: # Python >= 3.7
from collections.abc import Hashable
import pytest

View File

@ -10,10 +10,13 @@
import gc
import pickle
import re
from collections import Hashable, Iterable, Mapping, MutableMapping, OrderedDict
from operator import itemgetter
from os import getenv
from weakref import ref
try:
from collections import Hashable, Iterable, Mapping, MutableMapping, OrderedDict
except ImportError: # Python >= 3.7
from collections.abc import Hashable, Iterable, Mapping, MutableMapping, OrderedDict
import pytest
from hypothesis import HealthCheck, assume, given, settings, strategies as strat, unlimited