Skip to content
Merged
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
4 changes: 4 additions & 0 deletions credits/update_credits_licenses.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@
"""

import logging
import os
from pathlib import Path

import requests

os.chdir(Path(__file__).parent)

Comment on lines +19 to +20
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the process working directory at import time (os.chdir(...)) creates a global side effect that can break callers (e.g., if this script is invoked from another Python process or imported for reuse). Prefer keeping the original CWD and writing downloads to an explicit output_dir derived from Path(__file__).resolve().parent (use that path when opening the output file); if you keep chdir, at least move it (and the download loop) under an if __name__ == "__main__" guard.

Copilot uses AI. Check for mistakes.
# List of direct dependencies and their license URLs
direct_dependencies = [
# {"name": "tkinter", "license_url": "https://docs.python.org/3/license.html"},
Expand Down
Loading