From 670aed3800873869550b477846f48cb2b4193005 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 26 May 2020 19:01:28 -0700 Subject: rename HarvestState.next() to HarvestState.next_span() "span" short for "timespan" to harvest; there may be a better name to use. Motivation for this is to work around a pylint erorr that .next() was not callable. This might be a bug with pylint, but .next() is also a very generic name. --- python/fatcat_tools/harvest/harvest_common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python/fatcat_tools/harvest/harvest_common.py') diff --git a/python/fatcat_tools/harvest/harvest_common.py b/python/fatcat_tools/harvest/harvest_common.py index 5f7aa084..27ab8b4a 100644 --- a/python/fatcat_tools/harvest/harvest_common.py +++ b/python/fatcat_tools/harvest/harvest_common.py @@ -83,12 +83,12 @@ class HarvestState: self.to_process.add(current) current += datetime.timedelta(days=1) - def next(self, continuous=False): + def next_span(self, continuous=False): """ Gets next timespan (date) to be processed, or returns None if completed. If 'continuous' arg is True, will try to enqueue recent possibly valid - timespans; the idea is to call next() repeatedly, and it will return a + timespans; the idea is to call next_span() repeatedly, and it will return a new timespan when it becomes "available". """ if continuous: -- cgit v1.2.3