update to latest sphinx and pre-commit

This commit is contained in:
jab 2017-02-27 17:27:08 +00:00
parent 9eb335239d
commit 888531760c
2 changed files with 24 additions and 2 deletions

22
foo.py Normal file
View File

@ -0,0 +1,22 @@
import bidict, sortedcontainers, sortedcollections, collections
class sortedbidict2(bidict.OrderedMapping, bidict.bidict):
_fwd_class = sortedcontainers.SortedDict
_inv_class = sortedcollections.ValueSortedDict
elemByAtomicNum = sortedbidict2({1: 'hydrogen', 2: 'helium', 3: 'lithium'})
elemByAtomicNum.update({4: 'beryllium'})
# order is preserved correctly when passing .inv back into constructor:
atomicNumByElem = sortedbidict2(elemByAtomicNum.inv)
# attrs not defined by bidict are passed through to the _fwd SortedDict:
elemByAtomicNum.peekitem(index=0)
elemByAtomicNum.popitem(last=False)
elemByAtomicNum.inv.popitem(last=True)
elemByAtomicNum == {2: 'helium', 3: 'lithium'}
elemByAtomicNum == {3: 'lithium', 2: 'helium'}
bidict.OrderedMapping.__eq__(elemByAtomicNum, {3: 'lithium', 2: 'helium'})
collections.Mapping.__eq__(elemByAtomicNum, {3: 'lithium', 2: 'helium'})

View File

@ -27,7 +27,7 @@ tests_require = [
'pytest==3.0.6',
'pytest-benchmark==3.1.0a1',
'pytest-cov==2.4.0',
'Sphinx==1.5.2',
'Sphinx==1.5.3',
'sortedcollections==0.4.2',
'sortedcontainers==1.5.5',
]
@ -64,6 +64,6 @@ setup(
tests_require=tests_require,
extras_require=dict(
test=tests_require,
dev=tests_require + ['pre-commit==0.12.2', 'tox==2.3.2'],
dev=tests_require + ['pre-commit==0.13.3', 'tox==2.6.0'],
),
)