mm-std 0.4.6__py3-none-any.whl → 0.4.7__py3-none-any.whl
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.
mm_std/http/http_response.py
CHANGED
@@ -57,10 +57,10 @@ class HttpResponse:
|
|
57
57
|
def is_err(self) -> bool:
|
58
58
|
return self.error is not None or (self.status_code is not None and self.status_code >= 400)
|
59
59
|
|
60
|
-
def
|
60
|
+
def to_err[T](self, error: str | Exception | tuple[str, Exception] | None = None) -> Result[T]:
|
61
61
|
return Result.err(error or self.error or "error", extra=self.to_dict())
|
62
62
|
|
63
|
-
def
|
63
|
+
def to_ok[T](self, value: T) -> Result[T]:
|
64
64
|
return Result.ok(value, extra=self.to_dict())
|
65
65
|
|
66
66
|
def to_dict(self) -> dict[str, Any]:
|
@@ -27,7 +27,7 @@ mm_std/concurrency/sync_task_runner.py,sha256=s5JPlLYLGQGHIxy4oDS-PN7O9gcy-yPZFo
|
|
27
27
|
mm_std/http/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
28
28
|
mm_std/http/http_request.py,sha256=VnjZKrfaXQfMxrHRUqQ-Sxtr5Qf9FXBiJ-mmJTCzNkY,3709
|
29
29
|
mm_std/http/http_request_sync.py,sha256=bqCBilbe4ZJ9vkhuBQeU5UMTJh6BtvtUwjieEodu6rw,1542
|
30
|
-
mm_std/http/http_response.py,sha256=
|
31
|
-
mm_std-0.4.
|
32
|
-
mm_std-0.4.
|
33
|
-
mm_std-0.4.
|
30
|
+
mm_std/http/http_response.py,sha256=vrRv7Rjr5_kTUGllfW5oJ8ZqkcfiXc9T8PlBGAr-TBM,3884
|
31
|
+
mm_std-0.4.7.dist-info/METADATA,sha256=RM6Tu17kVqjVnLqV08LyQMWh2GuvdKV-wLsBbwon0OE,446
|
32
|
+
mm_std-0.4.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
33
|
+
mm_std-0.4.7.dist-info/RECORD,,
|
File without changes
|