Skip to content

Commit

Permalink
Add a few more type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolas committed Feb 5, 2025
1 parent 4ba8f05 commit 1694dee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions panopto/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def set_destination_attributes(self):
if not self.title:
self.title = fname

def create_session(self):
def create_session(self) -> bool:
# authenticate
auth = PanoptoAuth(self.server)

Expand Down Expand Up @@ -145,7 +145,8 @@ def upload_media(self):

source_file.close()

def _panopto_manifest(self, dest_filename: str, title: str, descript: str):
def _panopto_manifest(
self, dest_filename: str, title: str, descript: str) -> bytes:
namespace_map = {
None: 'http://tempuri.org/UniversalCaptureSpecification/v1',
'xsi': 'http://www.w3.org/2001/XMLSchema-instance',
Expand Down Expand Up @@ -198,7 +199,7 @@ def upload_manifest(self):
self.s3.upload_fileobj(
source_file, self.target.bucket_name, key_name, Config=config)

def complete_session(self):
def complete_session(self) -> bool:
url = 'https://{}/Panopto/PublicAPI/REST/sessionUpload/{}'.format(
self.server, self.target.upload_id)

Expand Down

0 comments on commit 1694dee

Please sign in to comment.