Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 37894ce

Browse files
authored
Disable false-positive linter error (#469)
* Disable false-positive linter error The build has been failing recently with a false positive linter error. Pylint was complaining that a method is not callable, even though the method is defined right on the following line. As I could not find either the reason pylint was failing or a solution that resolves this issue, this commit disables the check for that specific line pylint was failing on. * Fix assertions for non-partitioned db * Pin pylint version
1 parent 06735af commit 37894ce

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/cloudant/feed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def __next__(self):
144144
"""
145145
Provides Python3 compatibility.
146146
"""
147-
return self.next()
147+
return self.next() # pylint: disable=not-callable
148148

149149
def next(self):
150150
"""

test-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ mock==1.3.0
22
nose
33
sphinx
44
sphinx_rtd_theme
5-
pylint
5+
pylint==2.5.2
66
flaky

tests/unit/design_document_tests.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,8 @@ def test_fetch_dbcopy(self):
390390
# before comparison also. Compare the removed values with
391391
# the expected content in each case.
392392
self.assertEqual(db_copy, ddoc['views']['view002'].pop('dbcopy'))
393-
self.assertEqual({'epi': {'dbcopy': {'view002': db_copy}}}, ddoc_remote.pop('options'))
393+
self.assertEqual({'epi': {'dbcopy': {'view002': db_copy}}, 'partitioned': False}, ddoc_remote.pop('options'))
394+
self.assertEqual({'partitioned': False}, ddoc.pop('options'))
394395
self.assertEqual(ddoc_remote, ddoc)
395396
self.assertTrue(ddoc_remote['_rev'].startswith('1-'))
396397
self.assertEqual(ddoc_remote, {
@@ -1553,7 +1554,8 @@ def test_geospatial_index(self):
15531554
'indexes': {},
15541555
'views': {},
15551556
'lists': {},
1556-
'shows': {}
1557+
'shows': {},
1558+
'options': {'partitioned': False}
15571559
})
15581560
# Document with geospatial point
15591561
geodoc = Document(self.db, 'doc001')

0 commit comments

Comments
 (0)