simple-project-tracker 1.3.0__tar.gz → 1.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. {simple_project_tracker-1.3.0/simple_project_tracker.egg-info → simple_project_tracker-1.4.0}/PKG-INFO +9 -13
  2. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/README.md +8 -12
  3. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/pyproject.toml +3 -8
  4. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0/simple_project_tracker.egg-info}/PKG-INFO +9 -13
  5. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_cli.py +10 -30
  6. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_daemon.py +5 -15
  7. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_details.py +29 -0
  8. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_doctor.py +3 -9
  9. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_frecency.py +3 -3
  10. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_identity.py +4 -12
  11. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_keys.py +1 -3
  12. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_labels.py +2 -6
  13. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_moves.py +1 -3
  14. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_paths.py +2 -6
  15. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_portable.py +2 -8
  16. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_relocate.py +1 -3
  17. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_render.py +6 -18
  18. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_selection.py +4 -13
  19. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_settings.py +4 -13
  20. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_todos.py +3 -9
  21. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_tui.py +95 -4
  22. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_view.py +3 -10
  23. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/cli/app.py +2 -6
  24. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/cli/commands.py +6 -23
  25. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/cli/doctor.py +6 -19
  26. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/cli/entries.py +8 -24
  27. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/cli/relocate.py +1 -3
  28. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/cli/todo.py +6 -33
  29. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/config/defaults.py +4 -0
  30. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/config/keys.py +1 -3
  31. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/config/settings.py +1 -3
  32. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/config/writer.py +1 -3
  33. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/core/daemon.py +10 -31
  34. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/core/entries.py +16 -58
  35. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/core/frecency.py +2 -7
  36. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/core/identity.py +4 -16
  37. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/core/inspect.py +40 -0
  38. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/core/labels.py +3 -9
  39. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/core/portable.py +1 -3
  40. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/core/selection.py +3 -11
  41. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/core/storage.py +2 -6
  42. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/core/todos.py +14 -7
  43. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/core/undo.py +2 -6
  44. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/core/view.py +1 -5
  45. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/share/help.txt +1 -1
  46. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/share/settings.toml +7 -0
  47. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/ui/details.py +17 -8
  48. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/ui/mentions.py +4 -20
  49. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/ui/render.py +9 -34
  50. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/ui/todos.py +5 -15
  51. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/ui/tui.py +490 -61
  52. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/util/text.py +4 -14
  53. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/LICENSE +0 -0
  54. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/setup.cfg +0 -0
  55. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/simple_project_tracker.egg-info/SOURCES.txt +0 -0
  56. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/simple_project_tracker.egg-info/dependency_links.txt +0 -0
  57. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/simple_project_tracker.egg-info/entry_points.txt +0 -0
  58. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/simple_project_tracker.egg-info/top_level.txt +0 -0
  59. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_commands.py +0 -0
  60. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_help.py +0 -0
  61. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_names.py +0 -0
  62. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_storage.py +0 -0
  63. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tests/test_undo.py +0 -0
  64. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/__init__.py +0 -0
  65. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/__main__.py +0 -0
  66. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/cli/__init__.py +0 -0
  67. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/config/__init__.py +0 -0
  68. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/config/metadata.py +0 -0
  69. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/config/paths.py +0 -0
  70. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/core/__init__.py +0 -0
  71. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/core/discovery.py +0 -0
  72. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/core/models.py +0 -0
  73. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/py.typed +0 -0
  74. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/share/completion.bash +0 -0
  75. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/share/completion.fish +0 -0
  76. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/share/completion.zsh +0 -0
  77. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/ui/__init__.py +0 -0
  78. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/ui/ansi.py +0 -0
  79. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/ui/ask.py +0 -0
  80. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/ui/help.py +0 -0
  81. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/util/__init__.py +0 -0
  82. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/util/compat.py +0 -0
  83. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/util/files.py +0 -0
  84. {simple_project_tracker-1.3.0 → simple_project_tracker-1.4.0}/tracker/util/unknown.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simple-project-tracker
3
- Version: 1.3.0
3
+ Version: 1.4.0
4
4
  Summary: Simple project tracker
5
5
  Author-email: MattFor <mattfor@relaxy.xyz>
6
6
  License-Expression: MIT
@@ -30,10 +30,11 @@ Description-Content-Type: text/markdown
30
30
  License-File: LICENSE
31
31
  Dynamic: license-file
32
32
 
33
- # simple-project-tracker
33
+ # Simple Project Tracker
34
34
 
35
- [![Python](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org/downloads/)
36
- [![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
35
+ [![CI](https://github.com/MattFor/simple-project-tracker/actions/workflows/ci.yml/badge.svg)](https://github.com/MattFor/simple-project-tracker/actions/workflows/ci.yml)
36
+ [![PyPI](https://img.shields.io/pypi/v/simple-project-tracker)](https://pypi.org/project/simple-project-tracker/)
37
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
37
38
 
38
39
  A simple, but very customizable tracker to keep track of your projects, their states and
39
40
  your notes on them.
@@ -70,12 +71,7 @@ Python 3.11+. Then `t init ~/(your project directory)` to fill the database.
70
71
 
71
72
  ## Commands
72
73
 
73
- `t` on its own lists your projects. With `output.browser` on it opens a browser instead: your
74
- monitored folders as a tree, each project's status and last change, and the `check` view of
75
- the selected one beside it. Arrows move and fold, enter opens the details, `?` lists every
76
- key: search, every project instead of the filtered ones, a flat list, the full tree, sorting,
77
- one status at a time. Tab switches to your todos and the projects each one is about. `q`
78
- quits. Piped, or with `t list`, it prints the table instead.
74
+ `t` on its own lists projects. With `output.browser` on it opens a browser.
79
75
 
80
76
  | Command | Aliases | What it does |
81
77
  | ------------ | ------------------- | -------------------------------------------------------------------- |
@@ -174,7 +170,7 @@ When a partial name matches several projects, it's settled by
174
170
  The database can live in a Syncthing, Dropbox or git folder.
175
171
 
176
172
  ```sh
177
- t mv db ~/sync-folder/data.pkl # put the database where it syncs
173
+ t mv db ~/syncthing/data.pkl # put the database where it syncs
178
174
  t doctor # what is wrong with it
179
175
  t fix # put that right, undoable
180
176
  ```
@@ -231,6 +227,7 @@ or by its initials, with the section shortening the same way: `display.list_limi
231
227
  | `todos.sort`, `todos.newest_first` | How the todo list is ordered |
232
228
  | `[todos.display]` | Display settings the todo list alone uses |
233
229
  | `output.browser` | A bare `t` opens the project browser instead of the list |
230
+ | `output.branches` | `check` lists `local` branches, or `all` with remote ones |
234
231
 
235
232
  Notes can colour themselves: `t note 12 {red}broken{/} since friday`.
236
233
 
@@ -255,5 +252,4 @@ I wanted to get this project out asap as I really needed it :P
255
252
 
256
253
  ## License
257
254
 
258
- MIT [LICENSE](LICENSE).
259
- By MattFor.
255
+ MIT, see [LICENSE](LICENSE). By [MattFor](https://github.com/MattFor).
@@ -1,7 +1,8 @@
1
- # simple-project-tracker
1
+ # Simple Project Tracker
2
2
 
3
- [![Python](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org/downloads/)
4
- [![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
3
+ [![CI](https://github.com/MattFor/simple-project-tracker/actions/workflows/ci.yml/badge.svg)](https://github.com/MattFor/simple-project-tracker/actions/workflows/ci.yml)
4
+ [![PyPI](https://img.shields.io/pypi/v/simple-project-tracker)](https://pypi.org/project/simple-project-tracker/)
5
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
5
6
 
6
7
  A simple, but very customizable tracker to keep track of your projects, their states and
7
8
  your notes on them.
@@ -38,12 +39,7 @@ Python 3.11+. Then `t init ~/(your project directory)` to fill the database.
38
39
 
39
40
  ## Commands
40
41
 
41
- `t` on its own lists your projects. With `output.browser` on it opens a browser instead: your
42
- monitored folders as a tree, each project's status and last change, and the `check` view of
43
- the selected one beside it. Arrows move and fold, enter opens the details, `?` lists every
44
- key: search, every project instead of the filtered ones, a flat list, the full tree, sorting,
45
- one status at a time. Tab switches to your todos and the projects each one is about. `q`
46
- quits. Piped, or with `t list`, it prints the table instead.
42
+ `t` on its own lists projects. With `output.browser` on it opens a browser.
47
43
 
48
44
  | Command | Aliases | What it does |
49
45
  | ------------ | ------------------- | -------------------------------------------------------------------- |
@@ -142,7 +138,7 @@ When a partial name matches several projects, it's settled by
142
138
  The database can live in a Syncthing, Dropbox or git folder.
143
139
 
144
140
  ```sh
145
- t mv db ~/sync-folder/data.pkl # put the database where it syncs
141
+ t mv db ~/syncthing/data.pkl # put the database where it syncs
146
142
  t doctor # what is wrong with it
147
143
  t fix # put that right, undoable
148
144
  ```
@@ -199,6 +195,7 @@ or by its initials, with the section shortening the same way: `display.list_limi
199
195
  | `todos.sort`, `todos.newest_first` | How the todo list is ordered |
200
196
  | `[todos.display]` | Display settings the todo list alone uses |
201
197
  | `output.browser` | A bare `t` opens the project browser instead of the list |
198
+ | `output.branches` | `check` lists `local` branches, or `all` with remote ones |
202
199
 
203
200
  Notes can colour themselves: `t note 12 {red}broken{/} since friday`.
204
201
 
@@ -223,5 +220,4 @@ I wanted to get this project out asap as I really needed it :P
223
220
 
224
221
  ## License
225
222
 
226
- MIT [LICENSE](LICENSE).
227
- By MattFor.
223
+ MIT, see [LICENSE](LICENSE). By [MattFor](https://github.com/MattFor).
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "simple-project-tracker"
7
- version = "1.3.0"
7
+ version = "1.4.0"
8
8
  description = "Simple project tracker"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -57,13 +57,11 @@ tracker = ["py.typed", "share/*.toml", "share/*.txt", "share/completion.*"]
57
57
  dev = ["ruff", "basedpyright", "pytest>=9.0.2"]
58
58
 
59
59
  [tool.ruff]
60
- line-length = 90
61
- indent-width = 4
60
+ line-length = 120
62
61
 
63
62
  [tool.ruff.format]
64
63
  indent-style = "tab"
65
- quote-style = "double"
66
- line-ending = "auto"
64
+ quote-style = "preserve"
67
65
  skip-magic-trailing-comma = false
68
66
 
69
67
  [tool.ruff.lint]
@@ -84,9 +82,6 @@ select = [
84
82
  "RUF", # ruff specific
85
83
  ]
86
84
 
87
- [tool.ruff.lint.pycodestyle]
88
- max-line-length = 90
89
-
90
85
  [tool.pytest.ini_options]
91
86
  testpaths = ["tests"]
92
87
  addopts = "--strict-markers --strict-config"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simple-project-tracker
3
- Version: 1.3.0
3
+ Version: 1.4.0
4
4
  Summary: Simple project tracker
5
5
  Author-email: MattFor <mattfor@relaxy.xyz>
6
6
  License-Expression: MIT
@@ -30,10 +30,11 @@ Description-Content-Type: text/markdown
30
30
  License-File: LICENSE
31
31
  Dynamic: license-file
32
32
 
33
- # simple-project-tracker
33
+ # Simple Project Tracker
34
34
 
35
- [![Python](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org/downloads/)
36
- [![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
35
+ [![CI](https://github.com/MattFor/simple-project-tracker/actions/workflows/ci.yml/badge.svg)](https://github.com/MattFor/simple-project-tracker/actions/workflows/ci.yml)
36
+ [![PyPI](https://img.shields.io/pypi/v/simple-project-tracker)](https://pypi.org/project/simple-project-tracker/)
37
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
37
38
 
38
39
  A simple, but very customizable tracker to keep track of your projects, their states and
39
40
  your notes on them.
@@ -70,12 +71,7 @@ Python 3.11+. Then `t init ~/(your project directory)` to fill the database.
70
71
 
71
72
  ## Commands
72
73
 
73
- `t` on its own lists your projects. With `output.browser` on it opens a browser instead: your
74
- monitored folders as a tree, each project's status and last change, and the `check` view of
75
- the selected one beside it. Arrows move and fold, enter opens the details, `?` lists every
76
- key: search, every project instead of the filtered ones, a flat list, the full tree, sorting,
77
- one status at a time. Tab switches to your todos and the projects each one is about. `q`
78
- quits. Piped, or with `t list`, it prints the table instead.
74
+ `t` on its own lists projects. With `output.browser` on it opens a browser.
79
75
 
80
76
  | Command | Aliases | What it does |
81
77
  | ------------ | ------------------- | -------------------------------------------------------------------- |
@@ -174,7 +170,7 @@ When a partial name matches several projects, it's settled by
174
170
  The database can live in a Syncthing, Dropbox or git folder.
175
171
 
176
172
  ```sh
177
- t mv db ~/sync-folder/data.pkl # put the database where it syncs
173
+ t mv db ~/syncthing/data.pkl # put the database where it syncs
178
174
  t doctor # what is wrong with it
179
175
  t fix # put that right, undoable
180
176
  ```
@@ -231,6 +227,7 @@ or by its initials, with the section shortening the same way: `display.list_limi
231
227
  | `todos.sort`, `todos.newest_first` | How the todo list is ordered |
232
228
  | `[todos.display]` | Display settings the todo list alone uses |
233
229
  | `output.browser` | A bare `t` opens the project browser instead of the list |
230
+ | `output.branches` | `check` lists `local` branches, or `all` with remote ones |
234
231
 
235
232
  Notes can colour themselves: `t note 12 {red}broken{/} since friday`.
236
233
 
@@ -255,5 +252,4 @@ I wanted to get this project out asap as I really needed it :P
255
252
 
256
253
  ## License
257
254
 
258
- MIT [LICENSE](LICENSE).
259
- By MattFor.
255
+ MIT, see [LICENSE](LICENSE). By [MattFor](https://github.com/MattFor).
@@ -16,9 +16,7 @@ def test_free_text_commands_swallow_the_rest():
16
16
  ("add", ["~/code", "active", "a note with list in it"])
17
17
  ]
18
18
 
19
- assert split(["edit", "3", "note", "check this remove that"]) == [
20
- ("edit", ["3", "note", "check this remove that"])
21
- ]
19
+ assert split(["edit", "3", "note", "check this remove that"]) == [("edit", ["3", "note", "check this remove that"])]
22
20
 
23
21
 
24
22
  def test_dashed_aliases_are_accepted():
@@ -59,9 +57,7 @@ def test_flags_inside_a_note_stay_in_the_note():
59
57
  def test_a_project_may_come_before_its_command():
60
58
  assert split(["tracker", "check"]) == [("check", ["tracker"])]
61
59
  assert split(["12", "path"]) == [("path", ["12"])]
62
- assert split(["12", "edit", "status", "active"]) == [
63
- ("edit", ["12", "status", "active"])
64
- ]
60
+ assert split(["12", "edit", "status", "active"]) == [("edit", ["12", "status", "active"])]
65
61
 
66
62
 
67
63
  def test_a_project_before_a_subjectless_command_stays_a_lookup():
@@ -70,9 +66,7 @@ def test_a_project_before_a_subjectless_command_stays_a_lookup():
70
66
 
71
67
  def test_note_and_status_are_commands_of_their_own():
72
68
  assert split(["note", "12", "review sunday"]) == [("note", ["12", "review sunday"])]
73
- assert split(["12", "n", "review", "sunday"]) == [
74
- ("note", ["12", "review", "sunday"])
75
- ]
69
+ assert split(["12", "n", "review", "sunday"]) == [("note", ["12", "review", "sunday"])]
76
70
  assert split(["12", "st", "blocked"]) == [("status", ["12", "blocked"])]
77
71
 
78
72
 
@@ -92,9 +86,7 @@ def test_flags_inside_a_bare_note_stay_in_the_note():
92
86
  def test_sub_actions_are_not_mistaken_for_commands():
93
87
  assert split(["settings", "path"]) == [("settings", ["path"])]
94
88
  assert split(["settings", "edit"]) == [("settings", ["edit"])]
95
- assert split(["settings", "set", "sorting.by", "name"]) == [
96
- ("settings", ["set", "sorting.by", "name"])
97
- ]
89
+ assert split(["settings", "set", "sorting.by", "name"]) == [("settings", ["set", "sorting.by", "name"])]
98
90
  assert split(["daemon", "status"]) == [("daemon", ["status"])]
99
91
  assert split(["daemon", "restart"]) == [("daemon", ["restart"])]
100
92
  assert split(["daemon", "log", "40"]) == [("daemon", ["log", "40"])]
@@ -109,9 +101,7 @@ def test_a_double_dash_ends_the_options():
109
101
 
110
102
 
111
103
  def test_a_double_dash_stops_command_matching():
112
- assert split(["note", "3", "--", "check", "the", "list"]) == [
113
- ("note", ["3", "check", "the", "list"])
114
- ]
104
+ assert split(["note", "3", "--", "check", "the", "list"]) == [("note", ["3", "check", "the", "list"])]
115
105
 
116
106
  assert split(["check", "--", "list"]) == [("check", ["list"])]
117
107
 
@@ -163,9 +153,7 @@ def test_a_greedy_command_still_answers_a_bare_help():
163
153
  def test_help_inside_free_text_stays_free_text():
164
154
  assert split(["note", "5", "help", "me"]) == [("note", ["5", "help", "me"])]
165
155
  assert split(["note", "5", "--", "help"]) == [("note", ["5", "help"])]
166
- assert split(["add", "~/code", "todo", "help"]) == [
167
- ("add", ["~/code", "todo", "help"])
168
- ]
156
+ assert split(["add", "~/code", "todo", "help"]) == [("add", ["~/code", "todo", "help"])]
169
157
 
170
158
 
171
159
  def test_help_takes_a_topic_that_is_not_a_command():
@@ -180,9 +168,7 @@ def test_usage_is_only_recorded_when_it_is_turned_on():
180
168
  for enabled in (True, False):
181
169
  projects = make_projects(*SAMPLE)
182
170
 
183
- context = Context(
184
- settings=make_settings(projects__track_usage=enabled), data=projects
185
- )
171
+ context = Context(settings=make_settings(projects__track_usage=enabled), data=projects)
186
172
 
187
173
  assert context.mark_used(projects) is enabled
188
174
  assert context.pending is enabled
@@ -229,9 +215,7 @@ def test_the_decorator_saves_what_a_command_used(tmp_path: Path):
229
215
  def test_editing_only_a_field_fuses_into_edit():
230
216
  assert split(["11", "es", "shelf"]) == [("edit", ["11", "s", "shelf"])]
231
217
  assert split(["t:11", "es", "stable"]) == [("edit", ["t:11", "s", "stable"])]
232
- assert split(["11", "en", "review", "later"]) == [
233
- ("edit", ["11", "n", "review", "later"])
234
- ]
218
+ assert split(["11", "en", "review", "later"]) == [("edit", ["11", "n", "review", "later"])]
235
219
  assert fuse("est") == ("edit", "st")
236
220
 
237
221
 
@@ -241,9 +225,7 @@ def test_a_fused_edit_keeps_its_free_text():
241
225
  assert args == ["11", "en", "yes", "verbose"]
242
226
  assert flags["verbose"] is False
243
227
 
244
- assert split(["11", "en", "check", "the", "list"]) == [
245
- ("edit", ["11", "n", "check", "the", "list"])
246
- ]
228
+ assert split(["11", "en", "check", "the", "list"]) == [("edit", ["11", "n", "check", "the", "list"])]
247
229
 
248
230
 
249
231
  def test_all_asks_a_listing_for_everything():
@@ -254,9 +236,7 @@ def test_all_asks_a_listing_for_everything():
254
236
 
255
237
  def test_set_status_and_set_note_have_their_own_short_forms():
256
238
  assert split(["12", "ss", "blocked"]) == [("status", ["12", "blocked"])]
257
- assert split(["12", "sn", "review", "sunday"]) == [
258
- ("note", ["12", "review", "sunday"])
259
- ]
239
+ assert split(["12", "sn", "review", "sunday"]) == [("note", ["12", "review", "sunday"])]
260
240
  assert split(["ss", "12", "blocked"]) == [("status", ["12", "blocked"])]
261
241
 
262
242
 
@@ -103,9 +103,7 @@ def test_a_scan_labels_only_what_it_scanned(tmp_path: Path):
103
103
 
104
104
  data: Projects = {outside: new_project(outside, status="unknown", project_id=9)}
105
105
 
106
- _ = merge_scan(
107
- data, [tmp_path], find_projects(str(tmp_path), settings), True, settings
108
- )
106
+ _ = merge_scan(data, [tmp_path], find_projects(str(tmp_path), settings), True, settings)
109
107
 
110
108
  alpha = str(tmp_path / "alpha")
111
109
 
@@ -288,9 +286,7 @@ def test_a_project_only_the_other_machine_has_is_left_alone(tmp_path: Path):
288
286
 
289
287
  only_there = str(tmp_path / "beta")
290
288
 
291
- data: Projects = {
292
- only_there: new_project(only_there, status="dev", note="theirs", project_id=2)
293
- }
289
+ data: Projects = {only_there: new_project(only_there, status="dev", note="theirs", project_id=2)}
294
290
 
295
291
  elsewhere(data[only_there])
296
292
 
@@ -319,9 +315,7 @@ def test_losing_a_project_the_other_machine_still_has_does_not_bury_it(
319
315
 
320
316
  shutil.rmtree(tmp_path / "beta")
321
317
 
322
- result = merge_scan(
323
- data, [tmp_path], find_projects(str(tmp_path), settings), True, settings
324
- )
318
+ result = merge_scan(data, [tmp_path], find_projects(str(tmp_path), settings), True, settings)
325
319
 
326
320
  assert not result.removed
327
321
  assert not data[beta].get("archived", False)
@@ -335,17 +329,13 @@ def test_the_last_machine_to_lose_it_is_the_one_that_buries_it(tmp_path: Path):
335
329
 
336
330
  data: Projects = {}
337
331
 
338
- _ = merge_scan(
339
- data, [tmp_path], find_projects(str(tmp_path), settings), True, settings
340
- )
332
+ _ = merge_scan(data, [tmp_path], find_projects(str(tmp_path), settings), True, settings)
341
333
 
342
334
  beta = str(tmp_path / "beta")
343
335
 
344
336
  shutil.rmtree(tmp_path / "beta")
345
337
 
346
- result = merge_scan(
347
- data, [tmp_path], find_projects(str(tmp_path), settings), True, settings
348
- )
338
+ result = merge_scan(data, [tmp_path], find_projects(str(tmp_path), settings), True, settings)
349
339
 
350
340
  assert result.removed == [beta]
351
341
  assert data[beta].get("archived")
@@ -102,3 +102,32 @@ def test_the_metadata_falls_back_to_the_source_tree():
102
102
  assert project.name
103
103
  assert project.version
104
104
  assert project.author
105
+
106
+
107
+ def test_every_branch_is_listed_only_when_asked_for(tmp_path: Path):
108
+ import shutil
109
+ import subprocess
110
+
111
+ import pytest
112
+
113
+ if not shutil.which("git"):
114
+ pytest.skip("no git")
115
+
116
+ def git(*args: str) -> None:
117
+ _ = subprocess.run(["git", "-C", str(tmp_path), *args], check=True, capture_output=True)
118
+
119
+ git("init", "-q", "-b", "main")
120
+ git("-c", "user.name=t", "-c", "user.email=t@t", "commit", "-q", "--allow-empty", "-m", "first")
121
+ git("branch", "side")
122
+ git("update-ref", "refs/remotes/origin/main", "HEAD")
123
+ git("symbolic-ref", "refs/remotes/origin/HEAD", "refs/remotes/origin/main")
124
+
125
+ local = shown(str(tmp_path), sample(str(tmp_path)), output__branches="local")
126
+ every = shown(str(tmp_path), sample(str(tmp_path)), output__branches="all")
127
+
128
+ assert "* main" in local and " side" in local
129
+ assert "origin/main" not in local
130
+ assert "origin/main" in every
131
+ # origin/HEAD only points at origin/main
132
+ assert " origin " not in every
133
+ assert "Branches" not in shown(str(tmp_path), sample(str(tmp_path)))
@@ -107,9 +107,7 @@ def test_two_projects_sharing_a_name_are_left_alone(tmp_path: Path):
107
107
  assert not report.merges
108
108
 
109
109
 
110
- def test_a_project_found_somewhere_else_is_repointed(
111
- tmp_path: Path, monkeypatch: pytest.MonkeyPatch
112
- ):
110
+ def test_a_project_found_somewhere_else_is_repointed(tmp_path: Path, monkeypatch: pytest.MonkeyPatch):
113
111
  watched = tmp_path / "watched"
114
112
  here = living(tmp_path, "watched/moved-here")
115
113
 
@@ -123,9 +121,7 @@ def test_a_project_found_somewhere_else_is_repointed(
123
121
  monkeypatch.setattr(doctor, "fingerprint_of", marked)
124
122
 
125
123
  data: Projects = {
126
- "/gone/old-home": new_project(
127
- "/gone/old-home", status="dev", project_id=3, fingerprint="git:abc"
128
- )
124
+ "/gone/old-home": new_project("/gone/old-home", status="dev", project_id=3, fingerprint="git:abc")
129
125
  }
130
126
 
131
127
  holder = context(tmp_path, data, daemon__paths=[str(watched)])
@@ -169,9 +165,7 @@ def test_a_living_project_without_marks_is_reported(tmp_path: Path):
169
165
 
170
166
 
171
167
  def test_a_path_no_other_machine_could_place_is_reported(tmp_path: Path):
172
- data: Projects = {
173
- "/srv/work/alpha": new_project("/srv/work/alpha", status="dev", project_id=1)
174
- }
168
+ data: Projects = {"/srv/work/alpha": new_project("/srv/work/alpha", status="dev", project_id=1)}
175
169
 
176
170
  report = examine(context(tmp_path, data), deep=False)
177
171
 
@@ -135,9 +135,9 @@ def test_an_unknowable_clash_is_still_reported():
135
135
 
136
136
  def test_a_prefix_match_is_preferred_before_scoring():
137
137
  projects = sample()
138
- projects["/code/not-relaxy-at-all"] = make_projects(
139
- ("/code/not-relaxy-at-all", "dev", "2026-08-01 00:00:00", "")
140
- )["/code/not-relaxy-at-all"]
138
+ projects["/code/not-relaxy-at-all"] = make_projects(("/code/not-relaxy-at-all", "dev", "2026-08-01 00:00:00", ""))[
139
+ "/code/not-relaxy-at-all"
140
+ ]
141
141
 
142
142
  projects["/code/relaxy-public"]["uses"] = 3
143
143
  projects["/code/relaxy-public"]["last_used"] = stamp(timedelta(minutes=1))
@@ -63,9 +63,7 @@ def test_a_move_is_followed_by_the_fingerprint(tmp_path: Path):
63
63
  new = str(tmp_path / "new-home")
64
64
 
65
65
  data: Projects = {
66
- old: new_project(
67
- old, status="dev", note="kept", project_id=3, fingerprint="git:abc"
68
- ),
66
+ old: new_project(old, status="dev", note="kept", project_id=3, fingerprint="git:abc"),
69
67
  new: new_project(new, status="unknown", project_id=9, fingerprint="git:abc"),
70
68
  }
71
69
 
@@ -109,9 +107,7 @@ def test_an_inode_from_another_machine_pairs_with_nothing(tmp_path: Path):
109
107
  def test_an_inode_recorded_before_machines_had_names_is_restamped(tmp_path: Path):
110
108
  (tmp_path / ".git").mkdir()
111
109
 
112
- project = new_project(
113
- str(tmp_path), status="dev", project_id=1, identity="66306:1234"
114
- )
110
+ project = new_project(str(tmp_path), status="dev", project_id=1, identity="66306:1234")
115
111
 
116
112
  assert needs_marking(project)
117
113
  assert mark(str(tmp_path), project)
@@ -153,9 +149,7 @@ def test_another_machine_s_inode_is_left_where_it_is(tmp_path: Path):
153
149
  assert project.get("identity") == elsewhere()
154
150
 
155
151
 
156
- def test_a_matching_fingerprint_outvotes_an_inode_that_disagrees(
157
- tmp_path: Path, monkeypatch: pytest.MonkeyPatch
158
- ):
152
+ def test_a_matching_fingerprint_outvotes_an_inode_that_disagrees(tmp_path: Path, monkeypatch: pytest.MonkeyPatch):
159
153
  (tmp_path / ".git").mkdir()
160
154
 
161
155
  def same(path: str) -> str:
@@ -176,9 +170,7 @@ def test_a_matching_fingerprint_outvotes_an_inode_that_disagrees(
176
170
  assert not vanished(str(tmp_path), project)
177
171
 
178
172
 
179
- def test_a_different_repository_at_the_same_path_has_vanished(
180
- tmp_path: Path, monkeypatch: pytest.MonkeyPatch
181
- ):
173
+ def test_a_different_repository_at_the_same_path_has_vanished(tmp_path: Path, monkeypatch: pytest.MonkeyPatch):
182
174
  (tmp_path / ".git").mkdir()
183
175
 
184
176
  def other(path: str) -> str:
@@ -82,9 +82,7 @@ def test_a_scoped_display_answers_to_every_display_name():
82
82
  assert resolved("todos.display.list_lim") == "todos.display.list_limit"
83
83
  assert resolved("t.d.np") == "todos.display.note_position"
84
84
 
85
- assert (
86
- resolved("todos.display.status_colours.dev") == "todos.display.status_colours.dev"
87
- )
85
+ assert resolved("todos.display.status_colours.dev") == "todos.display.status_colours.dev"
88
86
 
89
87
 
90
88
  def test_a_scoped_display_reports_what_a_name_could_mean():
@@ -89,9 +89,7 @@ def test_the_rules_can_be_replaced():
89
89
  projects__auto_status_rules={"hot": 1, "cold": 0},
90
90
  )
91
91
 
92
- assert apply_labels(projects, settings, NOW) == [
93
- ("/code/project1", "unknown", "cold")
94
- ]
92
+ assert apply_labels(projects, settings, NOW) == [("/code/project1", "unknown", "cold")]
95
93
 
96
94
 
97
95
  def test_a_new_project_is_labelled_while_it_is_discovered(tmp_path: Path):
@@ -138,6 +136,4 @@ def test_an_ignored_file_pattern_reaches_a_scan(tmp_path: Path):
138
136
 
139
137
  found = find_projects(str(tmp_path), settings)
140
138
 
141
- assert found[str(project)]["last_touched"] == datetime.fromtimestamp(
142
- 1_000_000
143
- ).strftime("%Y-%m-%d %H:%M:%S")
139
+ assert found[str(project)]["last_touched"] == datetime.fromtimestamp(1_000_000).strftime("%Y-%m-%d %H:%M:%S")
@@ -35,9 +35,7 @@ def test_a_scan_stores_the_identity(tmp_path: Path):
35
35
 
36
36
  found = scan(tmp_path)
37
37
 
38
- assert found[str(tmp_path / "alpha")].get("identity") == identity_of(
39
- str(tmp_path / "alpha")
40
- )
38
+ assert found[str(tmp_path / "alpha")].get("identity") == identity_of(str(tmp_path / "alpha"))
41
39
 
42
40
 
43
41
  def test_a_moved_project_keeps_its_entry(tmp_path: Path):
@@ -19,9 +19,7 @@ def pretend_installed(monkeypatch: Patcher, package: Path) -> None:
19
19
  monkeypatch.setattr(paths, "_recovered", {})
20
20
 
21
21
 
22
- def test_the_package_is_found_again_after_its_directory_is_renamed(
23
- tmp_path: Path, monkeypatch: Patcher
24
- ):
22
+ def test_the_package_is_found_again_after_its_directory_is_renamed(tmp_path: Path, monkeypatch: Patcher):
25
23
  root = tmp_path / "tracker"
26
24
  package = source_tree(root)
27
25
 
@@ -54,9 +52,7 @@ def test_the_package_is_found_again_from_inside_it(tmp_path: Path, monkeypatch:
54
52
  assert paths.package_root() == renamed / "tracker"
55
53
 
56
54
 
57
- def test_a_package_that_really_vanished_keeps_the_path_it_was_installed_at(
58
- tmp_path: Path, monkeypatch: Patcher
59
- ):
55
+ def test_a_package_that_really_vanished_keeps_the_path_it_was_installed_at(tmp_path: Path, monkeypatch: Patcher):
60
56
  root = tmp_path / "tracker"
61
57
  package = source_tree(root)
62
58
 
@@ -35,9 +35,7 @@ def test_home_comes_back_as_this_machine_s_home(tmp_path: Path):
35
35
 
36
36
  settings = make_settings()
37
37
 
38
- assert portable.expand("~/code/alpha", portable.roots(settings)) == str(
39
- Path.home() / "code" / "alpha"
40
- )
38
+ assert portable.expand("~/code/alpha", portable.roots(settings)) == str(Path.home() / "code" / "alpha")
41
39
 
42
40
 
43
41
  def test_a_named_root_beats_home_when_it_is_more_specific(tmp_path: Path):
@@ -132,11 +130,7 @@ def test_a_database_written_elsewhere_lands_where_this_machine_keeps_it(
132
130
 
133
131
  os.environ["TRACKER_DATA"] = str(tmp_path / "data.pkl")
134
132
 
135
- written = {
136
- "@work/alpha": new_project(
137
- "@work/alpha", status="dev", note="shared note", project_id=4
138
- )
139
- }
133
+ written = {"@work/alpha": new_project("@work/alpha", status="dev", note="shared note", project_id=4)}
140
134
 
141
135
  assert save_pkl(tmp_path / "data.pkl", written)
142
136
 
@@ -196,6 +196,4 @@ def test_the_command_line_knows_move():
196
196
  assert fuse("mvt") == ("move", "t")
197
197
  assert fuse("mvs") == ("move", "s")
198
198
 
199
- assert split(["move", "todos", "~/check/list"]) == [
200
- ("move", ["todos", "~/check/list"])
201
- ]
199
+ assert split(["move", "todos", "~/check/list"]) == [("move", ["todos", "~/check/list"])]