Restructured text fixes so that pydoctor would return without an error

This commit is contained in:
Julian Stirling 2025-07-09 23:55:46 +01:00
parent 58b056988a
commit a84a916719
31 changed files with 269 additions and 256 deletions

View file

@ -25,7 +25,7 @@ def parse_arguments() -> Namespace:
def script_directory(path):
"""resolves path to directory of the current script"""
"""Resolves path to directory of the current script"""
return os.path.join(os.path.dirname(os.path.realpath(__file__)), path)

View file

@ -23,7 +23,6 @@ class Zenodo:
def create_new_deposit(self):
"""Creates a new (unpublished) Zenodo deposit and return its deposition ID."""
headers = {"Content-Type": "application/json"}
r = requests.post(
self.zenodo_url,
@ -37,7 +36,6 @@ class Zenodo:
def set_metadata(self, deposition_id, metadata):
"""Sets the given metadata for the specified deposit."""
headers = {"Content-Type": "application/json"}
r = requests.put(
self.zenodo_url + "/{}".format(deposition_id),
@ -50,7 +48,6 @@ class Zenodo:
def upload_file(self, deposition_id, file_path):
"""Uploads a new file for the given deposit."""
file_name = os.path.basename(file_path)
data = {"filename": file_name}
files = {"file": open(file_path, "rb")}
@ -65,7 +62,6 @@ class Zenodo:
def publish_deposit(self, deposition_id):
"""Publishes the given deposit. BEWARE: It is now visible to all!!!"""
r = requests.post(
self.zenodo_url + "/{}/actions/publish".format(deposition_id),
params={"access_token": self._api_token},
@ -75,7 +71,6 @@ class Zenodo:
def create_new_version(self, deposition_id):
"""Creates a new version of an already published deposit."""
r = requests.post(
self.zenodo_url + "/{}/actions/newversion".format(deposition_id),
params={"access_token": self._api_token},
@ -86,7 +81,6 @@ class Zenodo:
def remove_all_files(self, deposition_id):
"""Removes all uploaded files of a unpublished deposit."""
r = requests.get(
self.zenodo_url + "/{}/files".format(deposition_id),
params={"access_token": self._api_token},