Skip to content

Commit

Permalink
Remove obsolete "noinspection" comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pypt committed Jul 17, 2019
1 parent 4182e59 commit a5cd546
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
4 changes: 0 additions & 4 deletions tests/test_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ def test_sitemap_tree_for_homepage(self):
text="<h1>404 Not Found!</h1>",
)

# noinspection PyArgumentList
expected_sitemap_tree = IndexWebsiteSitemap(
url='{}/'.format(self.TEST_BASE_URL),
sub_sitemaps=[
Expand Down Expand Up @@ -979,7 +978,6 @@ def test_sitemap_tree_for_homepage_no_sitemap(self):
""".format(base_url=self.TEST_BASE_URL)).strip(),
)

# noinspection PyArgumentList
expected_sitemap_tree = IndexWebsiteSitemap(
url='{}/'.format(self.TEST_BASE_URL),
sub_sitemaps=[
Expand Down Expand Up @@ -1103,7 +1101,6 @@ def test_sitemap_tree_for_homepage_robots_txt_no_content_type(self):
""".format(base_url=self.TEST_BASE_URL)).strip(),
)

# noinspection PyArgumentList
expected_sitemap_tree = IndexWebsiteSitemap(
url='{}/'.format(self.TEST_BASE_URL),
sub_sitemaps=[
Expand Down Expand Up @@ -1138,7 +1135,6 @@ def test_sitemap_tree_for_homepage_no_robots_txt(self):
text="<h1>404 Not Found!</h1>",
)

# noinspection PyArgumentList
expected_sitemap_tree = IndexWebsiteSitemap(
url='{}/'.format(self.TEST_BASE_URL),
sub_sitemaps=[
Expand Down
9 changes: 0 additions & 9 deletions usp/fetch_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ def sitemap(self) -> AbstractSitemap:
log.info("Fetching level {} sitemap from {}...".format(self._recursion_level, self._url))
response = get_url_retry_on_client_errors(url=self._url, web_client=self._web_client)
if not response.is_success():
# noinspection PyArgumentList
return InvalidSitemap(
url=self._url,
reason="Unable to fetch sitemap from {}: {} {}".format(
Expand Down Expand Up @@ -178,7 +177,6 @@ def sitemap(self) -> AbstractSitemap:
fetched_sitemap = fetcher.sitemap()
sub_sitemaps.append(fetched_sitemap)

# noinspection PyArgumentList
index_sitemap = IndexRobotsTxtSitemap(url=self._url, sub_sitemaps=sub_sitemaps)

return index_sitemap
Expand All @@ -205,7 +203,6 @@ def sitemap(self) -> AbstractSitemap:
page = SitemapPage(url=page_url)
pages.append(page)

# noinspection PyArgumentList
text_sitemap = PagesTextSitemap(url=self._url, pages=pages)

return text_sitemap
Expand Down Expand Up @@ -242,7 +239,6 @@ def sitemap(self) -> AbstractSitemap:
log.error("Parsing sitemap from URL {} failed: {}".format(self._url, ex))

if not self._concrete_parser:
# noinspection PyArgumentList
return InvalidSitemap(
url=self._url,
reason="No parsers support sitemap from {}".format(self._url),
Expand Down Expand Up @@ -423,15 +419,13 @@ def sitemap(self) -> AbstractSitemap:
web_client=self._web_client)
fetched_sitemap = fetcher.sitemap()
except Exception as ex:
# noinspection PyArgumentList
fetched_sitemap = InvalidSitemap(
url=sub_sitemap_url,
reason="Unable to add sub-sitemap from URL {}: {}".format(sub_sitemap_url, str(ex)),
)

sub_sitemaps.append(fetched_sitemap)

# noinspection PyArgumentList
index_sitemap = IndexXMLSitemap(url=self._url, sub_sitemaps=sub_sitemaps)

return index_sitemap
Expand Down Expand Up @@ -639,7 +633,6 @@ def sitemap(self) -> AbstractSitemap:
if page:
pages.append(page)

# noinspection PyArgumentList
pages_sitemap = PagesXMLSitemap(url=self._url, pages=pages)

return pages_sitemap
Expand Down Expand Up @@ -755,7 +748,6 @@ def sitemap(self) -> AbstractSitemap:
if page:
pages.append(page)

# noinspection PyArgumentList
pages_sitemap = PagesRSSSitemap(url=self._url, pages=pages)

return pages_sitemap
Expand Down Expand Up @@ -888,7 +880,6 @@ def sitemap(self) -> AbstractSitemap:
if page:
pages.append(page)

# noinspection PyArgumentList
pages_sitemap = PagesAtomSitemap(url=self._url, pages=pages)

return pages_sitemap

0 comments on commit a5cd546

Please sign in to comment.