Skip to content

Fix: remove stray f in ValueError messages#980

Merged
jonbrenas merged 6 commits intomalariagen:masterfrom
suhr25:fix/invalid-param-error-messages
Mar 1, 2026
Merged

Fix: remove stray f in ValueError messages#980
jonbrenas merged 6 commits intomalariagen:masterfrom
suhr25:fix/invalid-param-error-messages

Conversation

@suhr25
Copy link
Copy Markdown
Contributor

@suhr25 suhr25 commented Feb 28, 2026

SUMMARY

This PR fixes a small formatting issue in error messages where a stray f was being shown to users. The issue affects validation in snp_data.py and hap_data.py, making the output look slightly broken.


FIX / CHANGES

  • Root cause

    • A typo (f{...} inside an f-string) caused a literal f to appear in the final message.
  • Approach

    • Removed the extra f so the string renders correctly.
    • No functional or behavioral changes.

Before

f"Invalid site mask, must be one of f{self.site_mask_ids}."

After

f"Invalid site mask, must be one of {self.site_mask_ids}."

VERIFICATION

Steps

  • Call:

    ag3.snp_sites(region="3L", site_mask="invalid")
  • Observe the error message.

Expected result

  • Error message cleanly lists valid options without the extra f.

Remove spurious literal 'f' character before the interpolated variable
in two ValueError messages, so users see the valid options clearly.

Signed-off-by: suhr25 <suhridmarwah07@gmail.com>
Signed-off-by: suhr25 <suhridmarwah07@gmail.com>
@suhr25
Copy link
Copy Markdown
Contributor Author

suhr25 commented Mar 1, 2026

@jonbrenas,
Could you please review this when you have time?
Thanks!

@suhr25
Copy link
Copy Markdown
Contributor Author

suhr25 commented Mar 1, 2026

@jonbrenas
Thanks for approval!
Is it ready to merge or needs some changes , do let me know.

@jonbrenas jonbrenas merged commit 1b2ef11 into malariagen:master Mar 1, 2026
5 checks passed
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