snap-python 0.1.2__tar.gz → 0.1.3__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. {snap_python-0.1.2 → snap_python-0.1.3}/PKG-INFO +1 -1
  2. {snap_python-0.1.2 → snap_python-0.1.3}/pyproject.toml +1 -1
  3. {snap_python-0.1.2 → snap_python-0.1.3}/src/snap_python/schemas/store/refresh.py +13 -0
  4. {snap_python-0.1.2 → snap_python-0.1.3}/src/snap_python/scrape.py +0 -1
  5. {snap_python-0.1.2 → snap_python-0.1.3}/LICENSE +0 -0
  6. {snap_python-0.1.2 → snap_python-0.1.3}/README.md +0 -0
  7. {snap_python-0.1.2 → snap_python-0.1.3}/src/snap_python/__init__.py +0 -0
  8. {snap_python-0.1.2 → snap_python-0.1.3}/src/snap_python/client.py +0 -0
  9. {snap_python-0.1.2 → snap_python-0.1.3}/src/snap_python/components/__init__.py +0 -0
  10. {snap_python-0.1.2 → snap_python-0.1.3}/src/snap_python/components/config.py +0 -0
  11. {snap_python-0.1.2 → snap_python-0.1.3}/src/snap_python/components/snaps.py +0 -0
  12. {snap_python-0.1.2 → snap_python-0.1.3}/src/snap_python/components/store.py +0 -0
  13. {snap_python-0.1.2 → snap_python-0.1.3}/src/snap_python/schemas/changes.py +0 -0
  14. {snap_python-0.1.2 → snap_python-0.1.3}/src/snap_python/schemas/common.py +0 -0
  15. {snap_python-0.1.2 → snap_python-0.1.3}/src/snap_python/schemas/config.py +0 -0
  16. {snap_python-0.1.2 → snap_python-0.1.3}/src/snap_python/schemas/snaps.py +0 -0
  17. {snap_python-0.1.2 → snap_python-0.1.3}/src/snap_python/schemas/store/__init__.py +0 -0
  18. {snap_python-0.1.2 → snap_python-0.1.3}/src/snap_python/schemas/store/categories.py +0 -0
  19. {snap_python-0.1.2 → snap_python-0.1.3}/src/snap_python/schemas/store/info.py +0 -0
  20. {snap_python-0.1.2 → snap_python-0.1.3}/src/snap_python/schemas/store/json/category_by_name_schema.json +0 -0
  21. {snap_python-0.1.2 → snap_python-0.1.3}/src/snap_python/schemas/store/json/category_schema.json +0 -0
  22. {snap_python-0.1.2 → snap_python-0.1.3}/src/snap_python/schemas/store/json/snaps_find_schema.json +0 -0
  23. {snap_python-0.1.2 → snap_python-0.1.3}/src/snap_python/schemas/store/json/snaps_info_schema.json +0 -0
  24. {snap_python-0.1.2 → snap_python-0.1.3}/src/snap_python/schemas/store/search.py +0 -0
  25. {snap_python-0.1.2 → snap_python-0.1.3}/src/snap_python/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: snap-python
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: Interact with snapd and snapstore(s) from Python
5
5
  License: MIT
6
6
  Author: Alexander Lukens
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "snap-python"
3
- version = "0.1.2"
3
+ version = "0.1.3"
4
4
  description = "Interact with snapd and snapstore(s) from Python"
5
5
  authors = ["Alexander Lukens <alexdlukens@gmail.com>"]
6
6
  license = "MIT"
@@ -72,6 +72,12 @@ class StoreRefreshSnap(Snap, SnapRefreshFields):
72
72
  pass
73
73
 
74
74
 
75
+ class RefreshResultError(BaseModel):
76
+ code: str
77
+ message: str
78
+ extra: Optional[dict] = None
79
+
80
+
75
81
  class RefreshResultData(BaseModel):
76
82
  model_config = ConfigDict(extra="forbid", exclude_unset=True)
77
83
 
@@ -98,6 +104,13 @@ class RefreshResultData(BaseModel):
98
104
  snap_id: str = Field(
99
105
  ..., alias=AliasChoices("snap-id", "snap_id"), serialization_alias="snap-id"
100
106
  )
107
+ error: RefreshResultError | None = None
108
+
109
+ @property
110
+ def is_error(self) -> bool:
111
+ if self.error:
112
+ return True
113
+ return False
101
114
 
102
115
 
103
116
  class RefreshRevisionResponse(BaseModel):
@@ -25,7 +25,6 @@ def get_highest_revision(channel_map: list[ChannelMapItem]) -> ChannelMapItem:
25
25
 
26
26
  """
27
27
 
28
- print(channel_map)
29
28
  return max(channel_map, key=lambda x: x.revision)
30
29
 
31
30
 
File without changes
File without changes