[PR #1708] refactor: use pathlib and cache for versions in make_game.py #1723

Open
opened 2026-11-26 21:18:44 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1708
Author: @flufyy-ao-909
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: patch-3


📝 Commits (1)

📊 Changes

1 file changed (+14 additions, -5 deletions)

View changed files

📝 make_game.py (+14 -5)

📄 Description

What and why

Refactor the versions() function in make_game.py to use pathlib, add @functools.cache to avoid repeated disk reads, and include robust error handling and manifest traceability (_manifest).

Tested

  • Verified syntax and verified that version manifests are loaded correctly.

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1708 **Author:** [@flufyy-ao-909](https://github.com/flufyy-ao-909) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `patch-3` --- ### 📝 Commits (1) - [`79ebbad`](https://github.com/ubiquitarianism/leonida/commit/79ebbad258b17349a158a18d9222575b642569e0) Update make_game.py ### 📊 Changes **1 file changed** (+14 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `make_game.py` (+14 -5) </details> ### 📄 Description ### What and why Refactor the `versions()` function in `make_game.py` to use `pathlib`, add `@functools.cache` to avoid repeated disk reads, and include robust error handling and manifest traceability (`_manifest`). ### Tested - Verified syntax and verified that version manifests are loaded correctly. GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1723
No description provided.