Skip to content

Fix f-string - #78

Merged
IrisvdWerf merged 2 commits into
developfrom
bug/update-f-string
Nov 9, 2026
Merged

IrisvdWerf merged 2 commits into
developfrom
bug/update-f-string

Conversation

@IrisvdWerf

Copy link
Copy Markdown
Collaborator

No description provided.

@IrisvdWerf
IrisvdWerf requested a review from maarten-ic November 5, 2026 15:40
@IrisvdWerf

Copy link
Copy Markdown
Collaborator Author

We could enable ruff's missing-f-string-syntax check (RUF027). It catches strings with {...} placeholders that are missing the "f" prefix, like this bug. t's still a preview rule, but we can turn on only this one preview rule by changing [tool.ruff.lint] in pyproject.toml to:

[tool.ruff.lint]
preview = true
explicit-preview-rules = true
select = [
  "E",
  "F",
  "UP",
  "B",
  "I",
  # missing-f-string-syntax (preview rule)
  "RUF027",
]

and pinning ruff in tox.ini (e.g. ruff==0.17.1 instead of ruff) so a ruff update can't unexpectedly break CI. What do you think?

@maarten-ic

Copy link
Copy Markdown
Collaborator

We could enable ruff's missing-f-string-syntax check

I'd be in favor of including the rule, but don't think we need to pin the ruff version.

@LourensVeen Do you have any thoughts on this?

@LourensVeen

Copy link
Copy Markdown
Contributor

Yes, let's include the rule, we've had this in other places too so it's good if it gets checked. As for pinning the version, we recently had ruff 0.17 change some of the rules and that wasn't too painful for me at least, so I think we can just leave it unpinned and get the benefits of the latest and greatest.

@maarten-ic maarten-ic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this!

@IrisvdWerf
IrisvdWerf merged commit 47832c8 into develop Nov 9, 2026
13 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.

3 participants