From 4a22a5ab5cdd59987d020fcaa201b708135499c0 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Wed, 26 Jun 2024 11:50:53 -0700 Subject: [PATCH] Fix error message formatting --- augur/curate/apply_geolocation_rules.py | 2 +- .../curate/cram/apply-geolocation-rules/cyclic-error.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/augur/curate/apply_geolocation_rules.py b/augur/curate/apply_geolocation_rules.py index f2c1b494b..7c167a9cf 100644 --- a/augur/curate/apply_geolocation_rules.py +++ b/augur/curate/apply_geolocation_rules.py @@ -163,7 +163,7 @@ def transform_geolocations(geolocation_rules, geolocation): if rules_applied > 1000: raise CyclicGeolocationRulesError( - "More than 1000 geolocation rules applied on the same entry {geolocation!r}." + f"More than 1000 geolocation rules applied on the same entry {geolocation!r}." ) # Create a new list of values for comparison to previous values diff --git a/tests/functional/curate/cram/apply-geolocation-rules/cyclic-error.t b/tests/functional/curate/cram/apply-geolocation-rules/cyclic-error.t index 6e3ee27f9..f380a0d33 100644 --- a/tests/functional/curate/cram/apply-geolocation-rules/cyclic-error.t +++ b/tests/functional/curate/cram/apply-geolocation-rules/cyclic-error.t @@ -21,5 +21,5 @@ Attempting to use the rules with a match results in an error. $ echo '{"region": "r_old", "country": "c_old", "division": "d_old", "location": "l_old"}' \ > | ${AUGUR} curate apply-geolocation-rules \ > --geolocation-rules rules.tsv - ERROR: More than 1000 geolocation rules applied on the same entry {geolocation!r}. + ERROR: More than 1000 geolocation rules applied on the same entry ['r_old', 'c_old', 'd_old', 'l_old']. [2]