Merge pull request #7015 from cjerdonek/simplify-get-pages

Remove unused project_name argument from LinkCollector._get_pages()
This commit is contained in:
Chris Jerdonek 2019-09-14 01:33:45 -07:00 committed by GitHub
commit 180a795660
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -363,8 +363,8 @@ class LinkCollector(object):
# type: () -> List[str]
return self.search_scope.find_links
def _get_pages(self, locations, project_name):
# type: (Iterable[Link], str) -> Iterable[HTMLPage]
def _get_pages(self, locations):
# type: (Iterable[Link]) -> Iterable[HTMLPage]
"""
Yields (page, page_url) from the given locations, skipping
locations that have errors.
@ -419,7 +419,7 @@ class LinkCollector(object):
logger.debug('* %s', location)
pages_links = {}
for page in self._get_pages(url_locations, project_name):
for page in self._get_pages(url_locations):
pages_links[page.url] = list(page.iter_links())
return CollectedLinks(

View File

@ -37,7 +37,7 @@ def make_no_network_finder(
)
# Replace the PackageFinder._link_collector's _get_pages() with a no-op.
link_collector = finder._link_collector
link_collector._get_pages = lambda locations, project_name: []
link_collector._get_pages = lambda locations: []
return finder