Skip to content

Commit aaaa100

Browse files
committed
Pylint fixes for datastore.
Removing an unused import and also adding a class-level attribute for ``next_page_token`` which gets set outside of the constructor (Pylint seems to miss the fact that it gets set in the constructor of the base class).
1 parent eec6e9f commit aaaa100

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

datastore/google/cloud/datastore/query.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,8 @@ class Iterator(BaseIterator):
397397
query results.
398398
"""
399399

400+
next_page_token = None
401+
400402
def __init__(self, query, client, limit=None, offset=None,
401403
start_cursor=None, end_cursor=None):
402404
super(Iterator, self).__init__(

datastore/unit_tests/test_query.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,6 @@ def test__process_query_results_done(self):
468468
self.assertFalse(iterator._more_results)
469469

470470
def test__process_query_results_bad_enum(self):
471-
from google.cloud.datastore._generated import query_pb2
472-
473471
iterator = self._makeOne(None, None)
474472
more_results_enum = 999
475473
with self.assertRaises(ValueError):

0 commit comments

Comments
 (0)