Skip to content

Require enum names in match TOML - #182

Merged
NicEastvillage merged 1 commit into
masterfrom
require-toml-enum-names
Dec 2, 2026
Merged

NicEastvillage merged 1 commit into
masterfrom
require-toml-enum-names

Conversation

@VirxEC

@VirxEC VirxEC commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

Core passes TOML strings to Enum.TryParse, which also accepts numeric strings and comma-separated names. For example, game_mode = "1" sets Hoops even though the config does not name a game mode.

Require one declared enum name. Matching still ignores case and surrounding whitespace. The explicit soccer alias and the boolean forms of enable_rendering are unchanged. If a config uses a numeric string, replace it with the enum name.

The regression tests cover a mixed-case name, a bare integer, two numeric strings, and a comma-separated value. All 25 core tests passed on Linux.

Related: RLBot/python-interface#49.

@NicEastvillage
NicEastvillage merged commit 93620f6 into master Dec 2, 2026
3 checks passed
@NicEastvillage
NicEastvillage deleted the require-toml-enum-names branch December 2, 2026 13:24
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