Skip to content

Commit bcb31aa

Browse files
committed
0.5.0 (2025-05-25)
------------------ **Changed:** pyproject.toml
1 parent 198256b commit bcb31aa

File tree

11 files changed

+51
-25
lines changed

11 files changed

+51
-25
lines changed

README.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ Return
245245
*int* Integer representing the SHA-256 hash of the dictionary.
246246

247247

248-
get_any(*args)
249-
--------------
248+
get_any(\*args)
249+
---------------
250250
Retrieve a nested value from a dictionary using a sequence of keys.
251251

252252
=========== =================== ====================================================================
@@ -268,8 +268,8 @@ Return
268268
assert value is None
269269
270270
271-
get_bool(*args)
272-
---------------
271+
get_bool(\*args)
272+
----------------
273273
Retrieve a nested boolean value from a dictionary using a sequence of keys.
274274

275275
=========== =================== ====================================================================
@@ -291,8 +291,8 @@ Return
291291
assert value is False
292292
293293
294-
get_dict(*args)
295-
---------------
294+
get_dict(\*args)
295+
----------------
296296
Retrieve a nested dictionary value from a dictionary using a sequence of keys.
297297

298298
=========== =================== ====================================================================
@@ -314,8 +314,8 @@ Return
314314
assert value == {}
315315
316316
317-
get_int(*args)
318-
--------------
317+
get_int(\*args)
318+
---------------
319319
Retrieve a nested integer value from a dictionary using a sequence of keys.
320320

321321
=========== =================== ====================================================================
@@ -337,8 +337,8 @@ Return
337337
assert value == 0
338338
339339
340-
get_list(*args)
341-
---------------
340+
get_list(\*args)
341+
----------------
342342
Retrieve a nested list value from a dictionary using a sequence of keys.
343343

344344
=========== =================== ====================================================================
@@ -360,8 +360,8 @@ Return
360360
assert value == []
361361
362362
363-
get_str(*args)
364-
--------------
363+
get_str(\*args)
364+
---------------
365365
Retrieve a nested string value from a dictionary using a sequence of keys.
366366

367367
=========== =================== ====================================================================

examples/vdict_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@
6060
value = vdict.get_str({"a": {"b": "B"}}, "a", "b")
6161
assert value == "B"
6262
value = vdict.get_str({"a": {"b": 1}}, "a", "b")
63-
assert value == ""
63+
assert value == ""

pyproject.toml

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ version = "0.5.0"
44
description = "Often used functions in vladimirs-git projects"
55
authors = ["Vladimir Prusakov <[email protected]>"]
66
readme = "README.rst"
7+
package-mode = true
78
license = "MIT"
8-
homepage = "https://github.com/vladimirs-git/vhelpers"
9-
repository = "https://github.com/vladimirs-git/vhelpers"
109
keywords = []
1110
classifiers = [
1211
"Development Status :: 5 - Production/Stable",
@@ -16,35 +15,36 @@ classifiers = [
1615
"Natural Language :: English",
1716
]
1817

18+
[tool.poetry.urls]
19+
homepage = "https://github.com/vladimirs-git/vhelpers"
20+
repository = "https://github.com/vladimirs-git/vhelpers"
21+
"Bug Tracker" = "https://github.com/vladimirs-git/vhelpers/issues"
22+
23+
[tool.poetry.extras]
24+
test = ["pytest"]
25+
1926
# FIX: Package docutils (0.21.post1) not found. #9293
2027
[[tool.poetry.source]]
2128
name = "pypi-public"
2229
url = "https://pypi.org/simple/"
2330

2431
[tool.poetry.dependencies]
2532
python = "^3.8"
33+
#
2634
tomli = "^2.0.1"
2735

2836
[tool.poetry.group.test.dependencies]
2937
pytest = "^7.4.2"
3038

31-
3239
[tool.poetry.group.dev.dependencies]
33-
dictdiffer = "^0.9.0"
3440
mypy = "^1.6.1"
3541
pydocstyle = "^6.3.0"
3642
pygments = "^2.16.1"
3743
pylint = "^3.2.7"
3844
pytest = "^8.3.5"
3945
restructuredtext-lint = "^1.4.0"
4046
ruff = "^0.11.4"
41-
tabulate = "^0.9.0"
42-
43-
[tool.poetry.extras]
44-
test = ["pytest"]
45-
46-
[tool.poetry.urls]
47-
"Bug Tracker" = "https://github.com/vladimirs-git/vhelpers/issues"
47+
twine= "^6.1.0"
4848

4949
[tool.setuptools.package-data]
5050
vhelpers = ["py.typed"]
@@ -58,8 +58,22 @@ enable = ["too-many-arguments", "too-many-locals"]
5858
max-args = 6
5959
max-locals = 16
6060

61+
[tool.pylint."tests.*"]
62+
disable = [
63+
"duplicate-code",
64+
"protected-access",
65+
"redefined-outer-name",
66+
"too-few-public-methods",
67+
"too-many-public-methods",
68+
"unsubscriptable-object",
69+
"unused-import",
70+
"use-dict-literal",
71+
"use-implicit-booleaness-not-comparison",
72+
]
73+
6174
[tool.mypy]
6275
python_version = "3.8"
76+
exclude = ["_notes"]
6377

6478
[tool.ruff]
6579
exclude = [
@@ -71,7 +85,7 @@ exclude = [
7185
".venv",
7286
"_notes",
7387
"dist",
74-
"demo",
88+
"sdist",
7589
"temp",
7690
"tmp",
7791
"venv",
@@ -86,6 +100,9 @@ indent-style = "space"
86100
skip-magic-trailing-comma = false # arguments on separate lines
87101
line-ending = "auto"
88102

103+
[tool.ruff.lint.pydocstyle]
104+
convention = "pep257" # docstring style
105+
89106
[build-system]
90107
requires = ["poetry-core"]
91108
build-backend = "poetry.core.masonry.api"

requirement.txt

-70 Bytes
Binary file not shown.

tests/test_vdict.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ def test__get_dict(keys: LStr, data: dict, expected: Any):
196196

197197
assert actual == expected
198198

199+
199200
@pytest.mark.parametrize("keys, data, expected", [
200201
(["id"], {"id": "1"}, 1),
201202
(["id"], {"id": 0}, 0),
@@ -259,6 +260,7 @@ def test__get_str(keys: LStr, data: dict, expected: Any):
259260

260261
assert actual == expected
261262

263+
262264
@pytest.mark.parametrize("keys, data, type_, expected", [
263265
(["a"], {"a": None}, str, ""),
264266
(["a"], {"a": 1}, str, ""),

vhelpers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""vhelpers."""
2+
23
from vhelpers import vdate
34
from vhelpers import vdict
45
from vhelpers import vint

vhelpers/types_.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Typing."""
2+
23
from datetime import date, datetime
34
from pathlib import Path
45
from typing import Any, Dict, List, Optional, Sequence, Set, Tuple, TypeVar, Union

vhelpers/vdate.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Helpers for date processing."""
2+
23
import datetime
34
import os
45

vhelpers/vdict.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Helpers for dictionary processing."""
2+
23
import hashlib
34
import json
45
from pathlib import Path
@@ -149,6 +150,7 @@ def sha256hash(data: dict) -> int:
149150

150151
# ============================ get typed =============================
151152

153+
152154
def get_any(*args) -> Any:
153155
"""Retrieve a nested value from a dictionary using a sequence of keys.
154156

vhelpers/vpath.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Helpers for path processing."""
2+
23
import os
34
import re
45
from pathlib import Path

0 commit comments

Comments
 (0)