From 8f4e125ae4ef5a6e6fceaf469537985266cc09c6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Mar 2026 08:52:23 +0000 Subject: [PATCH 1/2] Initial plan From 195487a861d2f5babe4ad2a8f3942e43b0fb80ce Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Mar 2026 08:54:20 +0000 Subject: [PATCH 2/2] Fix black formatting: add blank line after module docstrings Co-authored-by: erseco <1876752+erseco@users.noreply.github.com> --- example_script_with_progressbar.py | 1 + src/py_moodle/course.py | 1 + src/py_moodle/folder.py | 1 + src/py_moodle/module.py | 1 + src/py_moodle/upload.py | 1 + src/py_moodle/url.py | 1 + 6 files changed, 6 insertions(+) diff --git a/example_script_with_progressbar.py b/example_script_with_progressbar.py index 88dc392..aa162b6 100644 --- a/example_script_with_progressbar.py +++ b/example_script_with_progressbar.py @@ -26,6 +26,7 @@ To execute: `python example_script.py` """ + import os import time from pathlib import Path diff --git a/src/py_moodle/course.py b/src/py_moodle/course.py index 6d30cde..0ef30b2 100644 --- a/src/py_moodle/course.py +++ b/src/py_moodle/course.py @@ -5,6 +5,7 @@ Provides functions to list courses, retrieve course details, and enumerate course sections using AJAX endpoints. """ + import json import time import urllib.parse diff --git a/src/py_moodle/folder.py b/src/py_moodle/folder.py index 7bf2022..c09a41d 100644 --- a/src/py_moodle/folder.py +++ b/src/py_moodle/folder.py @@ -8,6 +8,7 @@ All code and comments are in English. """ + import json import re import time diff --git a/src/py_moodle/module.py b/src/py_moodle/module.py index a608155..ae22e63 100644 --- a/src/py_moodle/module.py +++ b/src/py_moodle/module.py @@ -3,6 +3,7 @@ Generic Moodle module management helpers. All code and comments are in English. """ + import json import re import time diff --git a/src/py_moodle/upload.py b/src/py_moodle/upload.py index 7460a4c..44f8248 100644 --- a/src/py_moodle/upload.py +++ b/src/py_moodle/upload.py @@ -4,6 +4,7 @@ This method requires a webservice token with 'core_files_upload' capability. """ + import mimetypes import os from pathlib import Path diff --git a/src/py_moodle/url.py b/src/py_moodle/url.py index 61f2f9a..18d3209 100644 --- a/src/py_moodle/url.py +++ b/src/py_moodle/url.py @@ -4,6 +4,7 @@ Provides functions to create and delete "url" modules linking to external resources. All code and comments are in English. """ + from __future__ import annotations import time