mirror of https://github.com/jab/bidict.git
update to latest pylint (2.0.0) and appease it
This commit is contained in:
parent
28a4936cbf
commit
20e1c18af1
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
8
setup.py
8
setup.py
|
@ -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(
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue