mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:10:53 +01:00
[PR #852] leonida_mods: trim model ID whitespace (MODS-PARSE-MODEL-WHITESPACE) #890
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#890
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/852
Author: @KernelSmoker
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:kernelsmoker/mods-parse-model-whitespace📝 Commits (1)
43b445cleonida_mods: trim model id whitespace📊 Changes
2 files changed (+13 additions, -0 deletions)
View changed files
📝
tests/test_leonida_mods.py(+10 -0)📝
tools/leonida_mods.py(+3 -0)📄 Description
Claimed in the coordination issue as: MODS-PARSE-MODEL-WHITESPACE — https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7134562317
What and why
Trim surrounding whitespace before parsing or hashing a textual model ID in a mod manifest. This makes accidental spaces/tabs/newlines resolve to the intended model ID instead of silently hashing a different name. Whitespace-only values remain invalid. Hex IDs also accept surrounding whitespace.
Tested
python3 -I tests/test_leonida_mods.py -v: 10/10 passed.python3 -I -m py_compile tools/leonida_mods.py tests/test_leonida_mods.py: passed.git diff --check: passed.GPUs tested: n/a (CPU-only parser tests)
AI-assisted: yes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.