Skip to content

Commit

Permalink
Add type hints to most of WAIL params and return values for #581
Browse files Browse the repository at this point in the history
  • Loading branch information
machawk1 committed Feb 7, 2025
1 parent f44a401 commit d4022a5
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 63 deletions.
8 changes: 4 additions & 4 deletions bundledApps/HeritrixJob.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


class HeritrixJob:
def write(self):
def write(self) -> None:
self.job_number = str(int(time.time()))
path = self.job_path + self.job_number
if not os.path.exists(path):
Expand All @@ -23,7 +23,7 @@ def write(self):
f.write(self.sampleXML)
# print beans_file_path+"crawler-beans.cxml"

def launch_heritrix_job(self):
def launch_heritrix_job(self) -> None:
logging.basicConfig(level=logging.DEBUG)
print('Launching Heritrix job')
data = {"action": "launch"}
Expand All @@ -36,7 +36,7 @@ def launch_heritrix_job(self):
config.heritrix_credentials_password),
data=data, headers=headers, verify=False, stream=True)

def build_heritrix_job(self):
def build_heritrix_job(self) -> None:
logging.basicConfig(level=logging.DEBUG)
print('Building Heritrix job')
data = {"action": "build"}
Expand All @@ -49,7 +49,7 @@ def build_heritrix_job(self):
data=data, headers=headers,
verify=False, stream=True)

def __init__(self, h_job_path, uris, depth=1):
def __init__(self, h_job_path : str, uris : list, depth : int = 1) -> None:
self.job_path = h_job_path
self.sampleXML = '''<?xml version="1.0" encoding="UTF-8"?>
<!--
Expand Down
Loading

0 comments on commit d4022a5

Please sign in to comment.