Skip to content

add inline dependencies#269

Open
Alistair1231 wants to merge 2 commits into
casualsnek:mainfrom
Alistair1231:inline-dependencies
Open

add inline dependencies#269
Alistair1231 wants to merge 2 commits into
casualsnek:mainfrom
Alistair1231:inline-dependencies

Conversation

@Alistair1231

@Alistair1231 Alistair1231 commented Apr 6, 2026

Copy link
Copy Markdown

This commit adds inline dependencies which allows for tools like uv to create and manage the venv for you when run like this:

sudo uv run main.py

Docs of uv on the topic

Copilot AI review requested due to automatic review settings April 6, 2026 11:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds PEP 723-style inline script metadata to main.py so tools like uv can resolve and install the script’s Python dependencies automatically when running the script.

Changes:

  • Added a # /// script inline metadata block declaring tqdm, requests, and InquirerPy as dependencies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread main.py
# dependencies = [
# "tqdm",
# "requests",
# "InquirerPy"

Copilot AI Apr 6, 2026

Copy link

Choose a reason for hiding this comment

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

The inline # /// script metadata is parsed as TOML (PEP 723 style). In a TOML array, items must be comma-separated; as written, the dependencies = [ block is invalid and tools like uv run --script will fail to parse it. Add commas between the dependency strings (a trailing comma is also fine).

Suggested change
# "InquirerPy"
# "InquirerPy",

Copilot uses AI. Check for mistakes.
Comment thread main.py
Comment on lines +2 to +8
# /// script
# dependencies = [
# "tqdm",
# "requests",
# "InquirerPy"
# ]
# ///

Copilot AI Apr 6, 2026

Copy link

Choose a reason for hiding this comment

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

This introduces a second source of truth for runtime dependencies (inline here and also in requirements.txt). That duplication can drift over time and cause confusing install/runtime mismatches. Consider either generating/deriving one from the other, or documenting which one is authoritative (and when each should be updated).

Suggested change
# /// script
# dependencies = [
# "tqdm",
# "requests",
# "InquirerPy"
# ]
# ///

Copilot uses AI. Check for mistakes.
Commented out additional dependencies in the script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants