Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = .git*,.codespellrc
check-hidden = true
# ignore-regex =
# ignore-words-list =
25 changes: 25 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Codespell configuration is within .codespellrc
---
name: Codespell

on:
push:
branches: [master]
pull_request:
branches: [master]

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Annotate locations with typos
uses: codespell-project/codespell-problem-matcher@v1
- name: Codespell
uses: codespell-project/actions-codespell@v2
4 changes: 2 additions & 2 deletions common/panopto_oauth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ def get_access_token_authorization_code_grant(self):
5. Save the token object, which includes refersh_token, for later refrehsh operation.
'''

# First, try getting a new access token from refesh token.
# First, try getting a new access token from refresh token.
access_token = self.__get_refreshed_access_token()
if access_token:
return access_token

# Then, fallback to the full autorization path. Offline access scope is needed to get refresh token.
# Then, fallback to the full authorization path. Offline access scope is needed to get refresh token.
scope = list(DEFAULT_SCOPE) + ['offline_access']
session = OAuth2Session(self.client_id, scope = scope, redirect_uri = REDIRECT_URL)

Expand Down
4 changes: 2 additions & 2 deletions folders-cli/panopto_folders.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __setup_or_refresh_access_token(self):
This method invokes OAuth2 Authorization Code Grant authorization flow.
It goes through browser UI for the first time.
It refreshes the access token after that and no user interfaction is requetsed.
This is called at the initialization of the class, as well as when 401 (Unaurhotized) is returend.
This is called at the initialization of the class, as well as when 401 (Unaurhotized) is returned.
'''
access_token = self.oauth2.get_access_token_authorization_code_grant()
self.requests_session.headers.update({'Authorization': 'Bearer ' + access_token})
Expand All @@ -38,7 +38,7 @@ def __inspect_response_is_retry_needed(self, response):

This method detects 401 (Unauthorized), refresh the access token, and returns as "is retry needed".
This method also detects 429 (Too many request) which means API throttling by the server. Wait a sec and return as "is retry needed".
Prodcution code should handle other failure cases and errors as appropriate.
Production code should handle other failure cases and errors as appropriate.
'''
if response.status_code // 100 == 2:
# Success on 2xx response.
Expand Down
2 changes: 1 addition & 1 deletion folders-cli/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def get_and_display_folder(folders, folder_id):
print()
print('Folder:')
if folder_id == GUID_TOPLEVEL:
print(' Top level folder (no detail informaiton is available)')
print(' Top level folder (no detail information is available)')
return None

folder = folders.get_folder(folder_id)
Expand Down
4 changes: 2 additions & 2 deletions sessions-cli/panopto_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __setup_or_refresh_access_token(self):
This method invokes OAuth2 Authorization Code Grant authorization flow.
It goes through browser UI for the first time.
It refreshes the access token after that and no user interfaction is requetsed.
This is called at the initialization of the class, as well as when 401 (Unauthorized) is returend.
This is called at the initialization of the class, as well as when 401 (Unauthorized) is returned.
'''
access_token = self.oauth2.get_access_token_authorization_code_grant()
self.requests_session.headers.update({'Authorization': 'Bearer ' + access_token})
Expand All @@ -38,7 +38,7 @@ def __inspect_response_is_retry_needed(self, response):

This method detects 401 (Unauthorized), refresh the access token, and returns as "is retry needed".
This method also detects 429 (Too many request) which means API throttling by the server. Wait a sec and return as "is retry needed".
Prodcution code should handle other failure cases and errors as appropriate.
Production code should handle other failure cases and errors as appropriate.
'''
if response.status_code // 100 == 2:
# Success on 2xx response.
Expand Down