blocket-toolkit 0.1.1__tar.gz → 0.1.2__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.
@@ -11,7 +11,7 @@
11
11
  "source": "./",
12
12
  "skills": ["./skills/blocket-toolkit"],
13
13
  "strict": false,
14
- "version": "0.1.1",
14
+ "version": "0.1.2",
15
15
  "description": "Search all of Blocket.se from the terminal: general items (torget), cars, boats, motorcycles and single ad details, with compact JSON output.",
16
16
  "author": {
17
17
  "name": "Daniel Hidefjäll",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: blocket-toolkit
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Search all of Blocket.se from the terminal: general items, cars, boats and motorcycles.
5
5
  Project-URL: Homepage, https://github.com/dojje/blocket-toolkit
6
6
  Project-URL: Repository, https://github.com/dojje/blocket-toolkit
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "blocket-toolkit"
7
- version = "0.1.1"
7
+ version = "0.1.2"
8
8
  description = "Search all of Blocket.se from the terminal: general items, cars, boats and motorcycles."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -0,0 +1,12 @@
1
+ """blocket-toolkit: search all of Blocket.se from the terminal."""
2
+
3
+ from importlib.metadata import PackageNotFoundError, version
4
+
5
+ from .client import BlocketClient, Page
6
+
7
+ try:
8
+ __version__ = version("blocket-toolkit")
9
+ except PackageNotFoundError:
10
+ __version__ = "0.0.0.dev0"
11
+
12
+ __all__ = ["BlocketClient", "Page", "__version__"]
@@ -0,0 +1,19 @@
1
+ import re
2
+ from importlib.metadata import version
3
+ from pathlib import Path
4
+
5
+ from blocket_toolkit import __version__
6
+
7
+
8
+ def test_version_matches_installed_metadata():
9
+ assert __version__ == version("blocket-toolkit")
10
+
11
+
12
+ def test_pyproject_version_matches_installed_metadata():
13
+ root = Path(__file__).resolve().parents[1]
14
+ pyproject = (root / "pyproject.toml").read_text(encoding="utf-8")
15
+ declared = re.search(r'^version = "([^"]+)"', pyproject, re.MULTILINE).group(1)
16
+ assert declared == version("blocket-toolkit"), (
17
+ "pyproject version and the installed distribution disagree; "
18
+ "reinstall the project after bumping the version"
19
+ )
@@ -1,6 +0,0 @@
1
- """blocket-toolkit: search all of Blocket.se from the terminal."""
2
-
3
- from .client import BlocketClient, Page
4
-
5
- __version__ = "0.1.0"
6
- __all__ = ["BlocketClient", "Page", "__version__"]
File without changes