taskcheck 1.3.0__tar.gz → 1.3.1__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 (25) hide show
  1. {taskcheck-1.3.0/taskcheck.egg-info → taskcheck-1.3.1}/PKG-INFO +1 -1
  2. {taskcheck-1.3.0 → taskcheck-1.3.1}/pyproject.toml +1 -1
  3. {taskcheck-1.3.0 → taskcheck-1.3.1}/taskcheck/__main__.py +2 -0
  4. {taskcheck-1.3.0 → taskcheck-1.3.1/taskcheck.egg-info}/PKG-INFO +1 -1
  5. {taskcheck-1.3.0 → taskcheck-1.3.1}/tests/test_main.py +9 -1
  6. {taskcheck-1.3.0 → taskcheck-1.3.1}/LICENSE +0 -0
  7. {taskcheck-1.3.0 → taskcheck-1.3.1}/README.md +0 -0
  8. {taskcheck-1.3.0 → taskcheck-1.3.1}/setup.cfg +0 -0
  9. {taskcheck-1.3.0 → taskcheck-1.3.1}/taskcheck/common.py +0 -0
  10. {taskcheck-1.3.0 → taskcheck-1.3.1}/taskcheck/google_calendar.py +0 -0
  11. {taskcheck-1.3.0 → taskcheck-1.3.1}/taskcheck/ical.py +0 -0
  12. {taskcheck-1.3.0 → taskcheck-1.3.1}/taskcheck/install.py +0 -0
  13. {taskcheck-1.3.0 → taskcheck-1.3.1}/taskcheck/parallel.py +0 -0
  14. {taskcheck-1.3.0 → taskcheck-1.3.1}/taskcheck/report.py +0 -0
  15. {taskcheck-1.3.0 → taskcheck-1.3.1}/taskcheck.egg-info/SOURCES.txt +0 -0
  16. {taskcheck-1.3.0 → taskcheck-1.3.1}/taskcheck.egg-info/dependency_links.txt +0 -0
  17. {taskcheck-1.3.0 → taskcheck-1.3.1}/taskcheck.egg-info/entry_points.txt +0 -0
  18. {taskcheck-1.3.0 → taskcheck-1.3.1}/taskcheck.egg-info/requires.txt +0 -0
  19. {taskcheck-1.3.0 → taskcheck-1.3.1}/taskcheck.egg-info/top_level.txt +0 -0
  20. {taskcheck-1.3.0 → taskcheck-1.3.1}/tests/test_common.py +0 -0
  21. {taskcheck-1.3.0 → taskcheck-1.3.1}/tests/test_google_calendar.py +0 -0
  22. {taskcheck-1.3.0 → taskcheck-1.3.1}/tests/test_ical.py +0 -0
  23. {taskcheck-1.3.0 → taskcheck-1.3.1}/tests/test_install.py +0 -0
  24. {taskcheck-1.3.0 → taskcheck-1.3.1}/tests/test_parallel.py +0 -0
  25. {taskcheck-1.3.0 → taskcheck-1.3.1}/tests/test_report.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: taskcheck
3
- Version: 1.3.0
3
+ Version: 1.3.1
4
4
  Summary: Automatic scheduler for taskwarrior
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "taskcheck"
3
- version = "1.3.0"
3
+ version = "1.3.1"
4
4
  description = "Automatic scheduler for taskwarrior"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -1,10 +1,12 @@
1
1
  import tomllib
2
2
  import argparse
3
+ from importlib.metadata import version
3
4
 
4
5
  from taskcheck.parallel import check_tasks_parallel
5
6
  from taskcheck.common import config_dir
6
7
 
7
8
  arg_parser = argparse.ArgumentParser()
9
+ arg_parser.add_argument("--version", action="version", version=f"taskcheck {version('taskcheck')}")
8
10
  arg_parser.add_argument(
9
11
  "-v", "--verbose", action="store_true", help="Increase output verbosity."
10
12
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: taskcheck
3
- Version: 1.3.0
3
+ Version: 1.3.1
4
4
  Summary: Automatic scheduler for taskwarrior
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -1,6 +1,8 @@
1
- import pytest
1
+ from importlib.metadata import version
2
2
  from unittest.mock import patch, Mock, mock_open
3
3
 
4
+ import pytest
5
+
4
6
  from taskcheck.__main__ import main, load_config, arg_parser
5
7
 
6
8
 
@@ -99,6 +101,12 @@ class TestArgumentParsing:
99
101
  args = arg_parser.parse_args(["--no-auto-adjust-urgency"])
100
102
  assert args.auto_adjust_urgency is False
101
103
 
104
+ def test_version_argument(self, capsys):
105
+ with pytest.raises(SystemExit, match="0"):
106
+ arg_parser.parse_args(["--version"])
107
+
108
+ assert capsys.readouterr().out == f"taskcheck {version('taskcheck')}\n"
109
+
102
110
 
103
111
  class TestConfigLoading:
104
112
  @patch(
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes