From 27859de146c2afeced6bcad5bfca00bddd1c5f2f Mon Sep 17 00:00:00 2001 From: Iris van der Werf Date: Thu, 5 Nov 2026 16:39:39 +0100 Subject: [PATCH 1/2] Fix f-string --- ymmsl/v0_2/ports.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ymmsl/v0_2/ports.py b/ymmsl/v0_2/ports.py index 24487ee..af26e35 100644 --- a/ymmsl/v0_2/ports.py +++ b/ymmsl/v0_2/ports.py @@ -185,8 +185,8 @@ def __init__( if lengthy: raise ValueError( "To avoid confusion, timeline annotations must have a single" - " identifier between colons, so {timeline} is not valid. Please" - " use names without periods instead of e.g. {lengthy[0]}." + f" identifier between colons, so {timeline} is not valid. Please" + f" use names without periods instead of e.g. {lengthy[0]}." ) self.timeline = timeline From f02ffad5ffd1d632af9e89ecb8373b3095f2b225 Mon Sep 17 00:00:00 2001 From: Iris van der Werf Date: Mon, 9 Nov 2026 10:12:06 +0100 Subject: [PATCH 2/2] Add rule to pyproject.toml --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index c1fb015..0260285 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,6 +75,8 @@ indent-width = 4 line-length = 88 [tool.ruff.lint] +preview = true +explicit-preview-rules = true select = [ # pycodestyle "E", @@ -86,6 +88,8 @@ select = [ "B", # isort "I", + # missing-f-string-syntax (preview rule) + "RUF027", # TODO: enable these at some point? # flake8-simplify #"SIM",