Skip to content

Commit 8815879

Browse files
committed
config: set default value of path to ~/calendars/*
1 parent 8d67245 commit 8815879

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

CHANGELOG.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ v4.6.0
88
------
99

1010
* **BREAKING**: Dropped support for Python 3.8.
11+
* The default value for ``path`` is now ``~/calendars/*``. Previously this
12+
value was required. This change is non-breaking; all existing valid
13+
configurations define this value.
1114

1215
v4.5.0
1316
------

config.py.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# A glob expression which matches all directories relevant.
2-
path = "~/.local/share/calendars/*"
2+
path = "~/my_calendars/*"
33
date_format = "%Y-%m-%d"
44
time_format = "%H:%M"
55
default_list = "Personal"

tests/test_config.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ def test_invalid_color_arg(config: py.path.local, runner: CliRunner) -> None:
8787
def test_missing_path(config: py.path.local, runner: CliRunner) -> None:
8888
config.write('color = "auto"\n')
8989
result = runner.invoke(cli, ["list"])
90-
assert result.exception
91-
assert "Error: Missing 'path' setting." in result.output
90+
assert not result.exception
9291

9392

9493
@pytest.mark.xfail(reason="Not implemented")

todoman/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class ConfigEntry(NamedTuple):
6767
ConfigEntry(
6868
"path",
6969
str,
70-
NO_DEFAULT,
70+
"~/calendars/",
7171
"""
7272
A glob pattern matching the directories where your todos are located. This
7373
pattern will be expanded, and each matching directory (with any icalendar

0 commit comments

Comments
 (0)