sqlite-export-for-ynab 2.9.9__tar.gz → 2.9.10__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.
- {sqlite_export_for_ynab-2.9.9/sqlite_export_for_ynab.egg-info → sqlite_export_for_ynab-2.9.10}/PKG-INFO +3 -2
- {sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/pyproject.toml +3 -2
- {sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/sqlite_export_for_ynab/_main.py +33 -1
- {sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10/sqlite_export_for_ynab.egg-info}/PKG-INFO +3 -2
- {sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/sqlite_export_for_ynab.egg-info/requires.txt +4 -1
- {sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/tests/_main_test.py +4 -4
- {sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/LICENSE +0 -0
- {sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/README.md +0 -0
- {sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/setup.cfg +0 -0
- {sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/sqlite_export_for_ynab/__init__.py +0 -0
- {sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/sqlite_export_for_ynab/__main__.py +0 -0
- {sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/sqlite_export_for_ynab/ddl/__init__.py +0 -0
- {sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/sqlite_export_for_ynab/ddl/create-relations.sql +0 -0
- {sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/sqlite_export_for_ynab/ddl/drop-relations.sql +0 -0
- {sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/sqlite_export_for_ynab/py.typed +0 -0
- {sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/sqlite_export_for_ynab.egg-info/SOURCES.txt +0 -0
- {sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/sqlite_export_for_ynab.egg-info/dependency_links.txt +0 -0
- {sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/sqlite_export_for_ynab.egg-info/entry_points.txt +0 -0
- {sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/sqlite_export_for_ynab.egg-info/top_level.txt +0 -0
- {sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/testing/__init__.py +0 -0
- {sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/testing/fixtures.py +0 -0
- {sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/tests/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlite_export_for_ynab
|
|
3
|
-
Version: 2.9.
|
|
3
|
+
Version: 2.9.10
|
|
4
4
|
Summary: SQLite Export for YNAB - Export YNAB Data to SQLite
|
|
5
5
|
Author-email: Max R <mxr@users.noreply.github.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -18,8 +18,9 @@ Requires-Dist: aiopathlib
|
|
|
18
18
|
Requires-Dist: aiosqlite
|
|
19
19
|
Requires-Dist: asyncio-for-ynab~=1.87.0
|
|
20
20
|
Requires-Dist: fasteners
|
|
21
|
-
Requires-Dist: rich>=
|
|
21
|
+
Requires-Dist: rich>=10
|
|
22
22
|
Requires-Dist: tenacity
|
|
23
|
+
Requires-Dist: typing-extensions; python_version < "3.12"
|
|
23
24
|
Dynamic: license-file
|
|
24
25
|
|
|
25
26
|
# sqlite-export-for-ynab
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "sqlite_export_for_ynab"
|
|
3
|
-
version = "2.9.
|
|
3
|
+
version = "2.9.10"
|
|
4
4
|
description = "SQLite Export for YNAB - Export YNAB Data to SQLite"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11" # generated by mxr/base
|
|
@@ -20,8 +20,9 @@ dependencies = [
|
|
|
20
20
|
"aiosqlite",
|
|
21
21
|
"asyncio-for-ynab~=1.87.0",
|
|
22
22
|
"fasteners",
|
|
23
|
-
"rich>=
|
|
23
|
+
"rich>=10",
|
|
24
24
|
"tenacity",
|
|
25
|
+
"typing-extensions; python_version<'3.12'",
|
|
25
26
|
]
|
|
26
27
|
|
|
27
28
|
[project.urls] # generated by mxr/base
|
{sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/sqlite_export_for_ynab/_main.py
RENAMED
|
@@ -43,7 +43,6 @@ from asyncio_for_ynab import TransactionsApi
|
|
|
43
43
|
from asyncio_for_ynab import TransactionsResponse
|
|
44
44
|
from asyncio_for_ynab import TransactionsResponseData
|
|
45
45
|
from rich.progress import BarColumn
|
|
46
|
-
from rich.progress import MofNCompleteColumn
|
|
47
46
|
from rich.progress import Progress
|
|
48
47
|
from rich.progress import TaskID
|
|
49
48
|
from rich.progress import TextColumn
|
|
@@ -66,15 +65,48 @@ _T = TypeVar("_T")
|
|
|
66
65
|
|
|
67
66
|
if sys.version_info >= (3, 12): # pragma: >=3.12 cover
|
|
68
67
|
from itertools import batched
|
|
68
|
+
from typing import override
|
|
69
69
|
else: # pragma: <3.12 cover
|
|
70
70
|
from itertools import islice
|
|
71
71
|
|
|
72
|
+
from typing_extensions import override
|
|
73
|
+
|
|
72
74
|
def batched(iterable: Iterable[_T], n: int) -> Iterator[tuple[_T, ...]]:
|
|
73
75
|
it = iter(iterable)
|
|
74
76
|
while batch := tuple(islice(it, n)):
|
|
75
77
|
yield batch
|
|
76
78
|
|
|
77
79
|
|
|
80
|
+
try:
|
|
81
|
+
from rich.progress import (
|
|
82
|
+
MofNCompleteColumn, # pyright: ignore[reportAssignmentType]
|
|
83
|
+
)
|
|
84
|
+
# https://github.com/benleb/surepy/issues/240
|
|
85
|
+
except ImportError: # pragma: no cover
|
|
86
|
+
from rich.progress import ProgressColumn
|
|
87
|
+
from rich.progress import Task
|
|
88
|
+
from rich.text import Text
|
|
89
|
+
|
|
90
|
+
if TYPE_CHECKING:
|
|
91
|
+
from rich.table import Column
|
|
92
|
+
|
|
93
|
+
class MofNCompleteColumn(ProgressColumn): # type:ignore[no-redef]
|
|
94
|
+
def __init__(self, separator: str = "/", table_column: Column | None = None):
|
|
95
|
+
self.separator = separator
|
|
96
|
+
super().__init__(table_column=table_column)
|
|
97
|
+
|
|
98
|
+
@override
|
|
99
|
+
def render(self, task: Task) -> Text:
|
|
100
|
+
"""Show completed/total."""
|
|
101
|
+
completed = int(task.completed)
|
|
102
|
+
total = int(task.total) if task.total is not None else "?"
|
|
103
|
+
total_width = len(str(total))
|
|
104
|
+
return Text(
|
|
105
|
+
f"{completed:{total_width}d}{self.separator}{total}",
|
|
106
|
+
style="progress.download",
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
|
|
78
110
|
_EntryTable = Literal[
|
|
79
111
|
"accounts",
|
|
80
112
|
"account_periodic_values",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlite_export_for_ynab
|
|
3
|
-
Version: 2.9.
|
|
3
|
+
Version: 2.9.10
|
|
4
4
|
Summary: SQLite Export for YNAB - Export YNAB Data to SQLite
|
|
5
5
|
Author-email: Max R <mxr@users.noreply.github.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -18,8 +18,9 @@ Requires-Dist: aiopathlib
|
|
|
18
18
|
Requires-Dist: aiosqlite
|
|
19
19
|
Requires-Dist: asyncio-for-ynab~=1.87.0
|
|
20
20
|
Requires-Dist: fasteners
|
|
21
|
-
Requires-Dist: rich>=
|
|
21
|
+
Requires-Dist: rich>=10
|
|
22
22
|
Requires-Dist: tenacity
|
|
23
|
+
Requires-Dist: typing-extensions; python_version < "3.12"
|
|
23
24
|
Dynamic: license-file
|
|
24
25
|
|
|
25
26
|
# sqlite-export-for-ynab
|
|
@@ -3,8 +3,10 @@ from __future__ import annotations
|
|
|
3
3
|
import tomllib
|
|
4
4
|
from datetime import date
|
|
5
5
|
from pathlib import Path
|
|
6
|
+
from unittest.mock import ANY
|
|
6
7
|
from unittest.mock import AsyncMock
|
|
7
8
|
from unittest.mock import Mock
|
|
9
|
+
from unittest.mock import call
|
|
8
10
|
from unittest.mock import patch
|
|
9
11
|
|
|
10
12
|
import aiosqlite
|
|
@@ -1048,8 +1050,7 @@ async def test_sync_lock_times_out(mock_get_running_loop, mock_acquire, tmp_path
|
|
|
1048
1050
|
timeout=0.1,
|
|
1049
1051
|
).__aenter__()
|
|
1050
1052
|
|
|
1051
|
-
|
|
1052
|
-
assert mock_acquire.call_args.args[1] is False
|
|
1053
|
+
mock_acquire.assert_called_once_with(ANY, False)
|
|
1053
1054
|
|
|
1054
1055
|
|
|
1055
1056
|
@patch(
|
|
@@ -1085,8 +1086,7 @@ async def test_context_retries_after_sleep(
|
|
|
1085
1086
|
):
|
|
1086
1087
|
pass
|
|
1087
1088
|
|
|
1088
|
-
assert mock_acquire.
|
|
1089
|
-
assert mock_acquire.call_args_list[0].args[1] is False
|
|
1089
|
+
assert mock_acquire.call_args_list == [call(ANY, False), call(ANY, False)]
|
|
1090
1090
|
assert mock_sleep.call_count == 1
|
|
1091
1091
|
assert mock_release.call_count == 1
|
|
1092
1092
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/sqlite_export_for_ynab/__init__.py
RENAMED
|
File without changes
|
{sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/sqlite_export_for_ynab/__main__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sqlite_export_for_ynab-2.9.9 → sqlite_export_for_ynab-2.9.10}/sqlite_export_for_ynab/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|