satori-python-client 0.13.0__tar.gz → 0.13.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: satori-python-client
3
- Version: 0.13.0
3
+ Version: 0.13.2
4
4
  Summary: Satori Protocol SDK for python, specify client part
5
5
  Home-page: https://github.com/RF-Tar-Railt/satori-python
6
6
  Author-Email: RF-Tar-Railt <rf_tar_railt@qq.com>
@@ -24,7 +24,7 @@ classifiers = [
24
24
  "Programming Language :: Python :: 3.12",
25
25
  "Operating System :: OS Independent",
26
26
  ]
27
- version = "0.13.0"
27
+ version = "0.13.2"
28
28
 
29
29
  [project.license]
30
30
  text = "MIT"
@@ -23,6 +23,8 @@ async def validate_response(resp: ClientResponse, noreturn: Literal[True]) -> No
23
23
 
24
24
  async def validate_response(resp: ClientResponse, noreturn=False):
25
25
  if 200 <= resp.status < 300:
26
+ if noreturn:
27
+ return
26
28
  return json.loads(content) if (content := await resp.text()) else {}
27
29
  elif resp.status == 400:
28
30
  raise BadRequestException(await resp.text())
@@ -38,6 +40,3 @@ async def validate_response(resp: ClientResponse, noreturn=False):
38
40
  raise ApiNotImplementedException(await resp.text())
39
41
  else:
40
42
  resp.raise_for_status()
41
- if not noreturn:
42
- return
43
- return json.loads(content) if (content := await resp.text()) else {}