Skip to content

Fix parsing mapgen options - #1165

Merged
Gatsik merged 2 commits into
FAForever:developfrom
Gatsik:fix-mapgen-options
Sep 19, 2026
Merged

Gatsik merged 2 commits into
FAForever:developfrom
Gatsik:fix-mapgen-options

Conversation

@Gatsik

@Gatsik Gatsik commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes

    • Improved map generator option handling to correctly recognize option names and refresh available options before extracting missing-version data.
  • Chores

    • Updated the code-formatting pre-commit tool to a newer revision.

passing "--" before option name works both with default
option names and their aliases

but if an alias is removed -- nothing we can do, we'll
have to manually fix parsing again as we do now
("texture-styles" became an alias and "biomes" is the new default)
@coderabbitai

coderabbitai Bot commented Sep 19, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 055c074f-1e9f-4a83-9f83-f9a07b85a714

📥 Commits

Reviewing files that changed from the base of the PR and between de8061c and 2d271a3.

📒 Files selected for processing (2)
  • .pre-commit-config.yaml
  • src/games/mapgenoptionsdialog.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The MapGenerator extractor now passes prefixed option names, removes the prefix from stored results, and refreshes options before missing-version extraction. The isort pre-commit hook revision changes from 8.0.1 to 9.0.1.

Changes

Map generator option handling

Layer / File(s) Summary
MapGenerator option extraction flow
src/games/mapgenoptionsdialog.py
The extractor passes options as --<option>, removes the prefix from completed option names, and refreshes its extraction list from dynamic_options before extraction.

Tooling revision

Layer / File(s) Summary
isort hook revision
.pre-commit-config.yaml
The isort pre-commit hook revision changes from 8.0.1 to 9.0.1.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: fixing map generator option parsing.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Gatsik
Gatsik merged commit 290d1bb into FAForever:develop Sep 19, 2026
3 checks passed
@Gatsik
Gatsik deleted the fix-mapgen-options branch September 19, 2026 18:57
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.

1 participant