From 8c40f2a6152becc01f29904634758ceadf4e4e53 Mon Sep 17 00:00:00 2001 From: Daniel Persson Date: Wed, 16 Oct 2024 06:33:22 +0200 Subject: [PATCH 1/2] Don't hardcode length of the budord list We have the list, so we know the number of elements. --- test_marvin_actions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_marvin_actions.py b/test_marvin_actions.py index 59c99b8..3327ab6 100644 --- a/test_marvin_actions.py +++ b/test_marvin_actions.py @@ -145,7 +145,7 @@ def testSource(self): def testBudord(self): """Test that marvin knows all the commandments""" - for n in range(1, 6): + for n, _ in enumerate(self.strings.get("budord")): self.assertStringsOutput(marvin_actions.marvinBudord, f"budord #{n}", "budord", f"#{n}") self.assertStringsOutput(marvin_actions.marvinBudord,"visa stentavla 1", "budord", "#1") From 8826c5192876ba8a40662e7876d0fcc841ad32f0 Mon Sep 17 00:00:00 2001 From: Daniel Persson Date: Wed, 13 Nov 2024 20:53:24 +0100 Subject: [PATCH 2/2] Add budord #6 Asking for help about lint warnings seem to be popular. --- marvin_strings.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/marvin_strings.json b/marvin_strings.json index a8a2a07..c85ccc7 100644 --- a/marvin_strings.json +++ b/marvin_strings.json @@ -63,7 +63,8 @@ "#2": "Var inte rädd för att fråga och fråga tills du får svar: https://dbwebb.se/f/6249", "#3": "Öva dig ställa smarta frågor: https://dbwebb.se/f/7802", "#4": "When in doubt - gör ett testprogram. https://dbwebb.se/f/13570", - "#5": "Hey Luke - use the source! https://catb.org/jargon/html/U/UTSL.html" + "#5": "Hey Luke - use the source! https://catb.org/jargon/html/U/UTSL.html", + "#6": "Om du googlar på felkoden från pylint så hittar du bra förklaringar på nätet, med exempel!" }, "video-of-today": {