Skip to content

Commit

Permalink
Fix Python2 incompatible type hinting
Browse files Browse the repository at this point in the history
  • Loading branch information
agude committed Aug 11, 2020
1 parent 89e343f commit 96ba31a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wayback_machine_archiver/archiver.py
Expand Up @@ -47,15 +47,15 @@ def get_namespace(element):
return match.group(0) if match else ""


def download_remote_sitemap(sitemap_url: str, session) -> str:
def download_remote_sitemap(sitemap_url, session):
"""Download the sitemap of the target website."""
logging.debug("Downloading: %s", sitemap_url)
r = session.get(sitemap_url)

return r.text.encode("utf-8")


def load_local_sitemap(sitemap_filepath: str) -> str:
def load_local_sitemap(sitemap_filepath):
"""Load a local sitemap and return it as a string."""
logging.debug("Loading local sitemap: %s", sitemap_filepath)

Expand All @@ -74,7 +74,7 @@ def load_local_sitemap(sitemap_filepath: str) -> str:
return contents


def sitemap_is_local(sitemap_url: str) -> bool:
def sitemap_is_local(sitemap_url):
"""Returns True if we believe a URI to be local, False otherwise."""
return sitemap_url.startswith(LOCAL_PREFIX) or sitemap_url.startswith("/")

Expand Down

0 comments on commit 96ba31a

Please sign in to comment.