From 2d0997d8116fd2656232f846b1f23b788672bc7b Mon Sep 17 00:00:00 2001 From: "Code Hugger (Matthew Jones)" Date: Thu, 22 Aug 2024 16:27:02 -0400 Subject: [PATCH 1/3] Fixes #663 - New Quizzes URL not considered in paginated_list --- canvasapi/paginated_list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/canvasapi/paginated_list.py b/canvasapi/paginated_list.py index 0183f93d..4ac78748 100644 --- a/canvasapi/paginated_list.py +++ b/canvasapi/paginated_list.py @@ -96,7 +96,7 @@ def _get_next_page(self): else: next_link = None - regex = r"{}(.*)".format(re.escape(self._requester.base_url)) + regex = r"(?:{}|{})(.*)".format(re.escape(self._requester.base_url), re.escape(self._requester.new_quizzes_url)) self._next_url = ( re.search(regex, next_link["url"]).group(1) if next_link else None From 8073902fcb67d4106ba8c12725689addf26dae8f Mon Sep 17 00:00:00 2001 From: "Code Hugger (Matthew Jones)" Date: Thu, 22 Aug 2024 17:13:04 -0400 Subject: [PATCH 2/3] Flake8 error line length --- canvasapi/paginated_list.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/canvasapi/paginated_list.py b/canvasapi/paginated_list.py index 4ac78748..65fc70a1 100644 --- a/canvasapi/paginated_list.py +++ b/canvasapi/paginated_list.py @@ -96,7 +96,8 @@ def _get_next_page(self): else: next_link = None - regex = r"(?:{}|{})(.*)".format(re.escape(self._requester.base_url), re.escape(self._requester.new_quizzes_url)) + regex = r"(?:{}|{})(.*)".format( + re.escape(self._requester.base_url), re.escape(self._requester.new_quizzes_url)) self._next_url = ( re.search(regex, next_link["url"]).group(1) if next_link else None From d52f8c2923a72d8a1accb1286d9fa22c36939c2b Mon Sep 17 00:00:00 2001 From: "Code Hugger (Matthew Jones)" Date: Thu, 22 Aug 2024 17:13:55 -0400 Subject: [PATCH 3/3] Reformatted by black --- canvasapi/paginated_list.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/canvasapi/paginated_list.py b/canvasapi/paginated_list.py index 65fc70a1..bf799874 100644 --- a/canvasapi/paginated_list.py +++ b/canvasapi/paginated_list.py @@ -97,7 +97,9 @@ def _get_next_page(self): next_link = None regex = r"(?:{}|{})(.*)".format( - re.escape(self._requester.base_url), re.escape(self._requester.new_quizzes_url)) + re.escape(self._requester.base_url), + re.escape(self._requester.new_quizzes_url), + ) self._next_url = ( re.search(regex, next_link["url"]).group(1) if next_link else None