From 8ca0a8c67483bc7269bdccc4482ae250dca8e535 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sat, 14 Nov 2026 15:17:53 +0100 Subject: [PATCH] Sort the imports of the plan store and todo-item --- bin/plan_store/contract.py | 2 +- bin/plan_store/fakes.py | 2 +- bin/plan_store/markdown_edits.py | 2 +- bin/plan_store/stores.py | 4 ++-- bin/plan_store/test_stores.py | 6 +++--- bin/todo_item/table.py | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/plan_store/contract.py b/bin/plan_store/contract.py index 32ea14aa..a2159252 100644 --- a/bin/plan_store/contract.py +++ b/bin/plan_store/contract.py @@ -1,10 +1,10 @@ """What every plan backend must hold, as tests. A backend's test case inherits PlanStoreContract and unittest.TestCase, and builds its store in new_store. record_store.contract is its twin for records.""" import typing +from release_plan.todo_table import BLOCKED_BY, Item, MOVES from failure import Failure from plan_store.stores import Plan, PlanStore, TAGLINE, Written from release_plan.release import release_of -from release_plan.todo_table import BLOCKED_BY, Item, MOVES FIRST = {"Release": "0.1.0", TAGLINE: "Count the runs.", "L": "1", "E": "2", "I": "3", "S": "1", MOVES: "1 by 9"} SECOND = {"Release": "0.2.0", TAGLINE: "Ship the later thing.", "L": "2", "E": "1", "I": "1", "S": "2", MOVES: "1 by 8", "Exempt": "owner"} diff --git a/bin/plan_store/fakes.py b/bin/plan_store/fakes.py index 3ba0b320..ccb47fc6 100644 --- a/bin/plan_store/fakes.py +++ b/bin/plan_store/fakes.py @@ -1,9 +1,9 @@ """Plan stores for tests, held to plan_store.contract like every backend.""" import dataclasses -from failure import Failure from plan_store.markdown_edits import bold_cell, plain from plan_store.stores import cells, Plan, Written +from failure import Failure from release_plan.todo_table import Item, parse_row, SHAPE, Table diff --git a/bin/plan_store/markdown_edits.py b/bin/plan_store/markdown_edits.py index 3d563da3..19f90a68 100644 --- a/bin/plan_store/markdown_edits.py +++ b/bin/plan_store/markdown_edits.py @@ -1,9 +1,9 @@ """The text edits behind the markdown plan: filing an item in todo.md, changing one and removing one. Each returns new text; ranking.rank then orders the table and details and writes the derived cells.""" import re +from release_plan.todo_table import cells, DETAILS, item_details, items_table, Table from failure import Failure from release_plan.ranking import stated -from release_plan.todo_table import cells, DETAILS, item_details, items_table, Table # A line that would end ## Details (##) or could open another item's detail (###). HEADING = re.compile(r"^#{2,3} ", re.M) diff --git a/bin/plan_store/stores.py b/bin/plan_store/stores.py index 93b35e31..33f87d0b 100644 --- a/bin/plan_store/stores.py +++ b/bin/plan_store/stores.py @@ -7,14 +7,14 @@ import dataclasses import pathlib import typing +from release_plan.todo_table import BLOCKED_BY, Item, item_details, items, MOVES, NoItemsTable, renames from failure import Failure from git_cli.git_repo import file_at, git, Git from plan_store import markdown_edits from project_config.settings import ProjectConfig -from record_store.stores import RecordStore, store as record_store from release_plan import ranking +from record_store.stores import store as record_store, RecordStore from release_plan.release import Release -from release_plan.todo_table import BLOCKED_BY, Item, item_details, items, MOVES, NoItemsTable, renames from text_files.file_writes import replace_file TAGLINE = "Tagline" diff --git a/bin/plan_store/test_stores.py b/bin/plan_store/test_stores.py index 26e06243..9afad711 100644 --- a/bin/plan_store/test_stores.py +++ b/bin/plan_store/test_stores.py @@ -6,13 +6,13 @@ import unittest sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) from failure import Failure -from plan_store import stores from plan_store.contract import FIRST, PlanStoreContract, SECOND from plan_store.fakes import MemoryPlan from record_store.fakes import MemoryStore -from release_plan.release import release_of -from release_plan.test_ranking import README from release_plan.todo_table import NoItemsTable +from release_plan.test_ranking import README +from release_plan.release import release_of +from plan_store import stores EMPTY = "# todo\n\n## Scoring\n\n`Score = 100 * V / 2**S`\n\n`Bar = 2`\n\n`Next ID = 1`\n\n## Items\n\n| ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score |\n|---|---|---|---|---|---|---|---|---|---|---|---|\n" diff --git a/bin/todo_item/table.py b/bin/todo_item/table.py index ff3d3b06..61bf35f1 100644 --- a/bin/todo_item/table.py +++ b/bin/todo_item/table.py @@ -1,6 +1,6 @@ """How todo-item prints items: as rows of the table `rank_todo.py --help` shows, whatever backend holds the plan, without the Score a markdown plan alone has.""" -from release_plan.release import version from release_plan.todo_table import BLOCKED_BY, Item, OLD_SHAPE, risk, SHAPE, Shape +from release_plan.release import version def table(items: list[Item]) -> str: