Skip to content

Commit 4f56743

Browse files
guicho271828arunkannawadi
authored andcommitted
Unmix return and yield from from a single function
Fixes #453
1 parent 1851dc8 commit 4f56743

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

scholarly/_scholarly.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,9 @@ def citedby(self, object: Publication)->_SearchScholarIterator:
305305
# Go one year at a time in decreasing order
306306
years = zip(range(year_end, year_low-1, -1), range(year_end, year_low-1, -1))
307307

308+
return self._citedby_long(object,years)
309+
310+
def _citedby_long(self, object: Publication, years):
308311
# Extract cites_id. Note: There could be multiple ones, separated by commas.
309312
m = re.search("cites=[\d+,]*", object["citedby_url"])
310313
pub_id = m.group()[6:]

0 commit comments

Comments
 (0)