polyapi-python 0.3.8.dev3__py3-none-any.whl → 0.3.8.dev4__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.
- polyapi/generate.py +8 -9
- {polyapi_python-0.3.8.dev3.dist-info → polyapi_python-0.3.8.dev4.dist-info}/METADATA +1 -1
- {polyapi_python-0.3.8.dev3.dist-info → polyapi_python-0.3.8.dev4.dist-info}/RECORD +6 -6
- {polyapi_python-0.3.8.dev3.dist-info → polyapi_python-0.3.8.dev4.dist-info}/WHEEL +0 -0
- {polyapi_python-0.3.8.dev3.dist-info → polyapi_python-0.3.8.dev4.dist-info}/licenses/LICENSE +0 -0
- {polyapi_python-0.3.8.dev3.dist-info → polyapi_python-0.3.8.dev4.dist-info}/top_level.txt +0 -0
polyapi/generate.py
CHANGED
|
@@ -2,7 +2,7 @@ import json
|
|
|
2
2
|
import requests
|
|
3
3
|
import os
|
|
4
4
|
import shutil
|
|
5
|
-
from typing import List, Optional, Tuple, cast
|
|
5
|
+
from typing import Any, List, Optional, Tuple, cast
|
|
6
6
|
|
|
7
7
|
from .auth import render_auth_function
|
|
8
8
|
from .client import render_client_function
|
|
@@ -41,7 +41,7 @@ def get_specs(contexts: Optional[List[str]] = None, names: Optional[List[str]] =
|
|
|
41
41
|
assert api_key
|
|
42
42
|
headers = get_auth_headers(api_key)
|
|
43
43
|
url = f"{api_url}/specs"
|
|
44
|
-
params = {"noTypes": str(no_types).lower()}
|
|
44
|
+
params: Any = {"noTypes": str(no_types).lower()}
|
|
45
45
|
|
|
46
46
|
if contexts:
|
|
47
47
|
params["contexts"] = contexts
|
|
@@ -155,7 +155,7 @@ def parse_function_specs(
|
|
|
155
155
|
|
|
156
156
|
# Functions with serverSideAsync True will always return a Dict with execution ID
|
|
157
157
|
if spec.get('serverSideAsync') and spec.get("function"):
|
|
158
|
-
spec['function']['returnType'] = {'kind': 'plain', 'value': 'object'}
|
|
158
|
+
spec['function']['returnType'] = {'kind': 'plain', 'value': 'object'} # type: ignore
|
|
159
159
|
|
|
160
160
|
functions.append(spec)
|
|
161
161
|
|
|
@@ -321,11 +321,9 @@ def generate(contexts: Optional[List[str]] = None, names: Optional[List[str]] =
|
|
|
321
321
|
)
|
|
322
322
|
exit()
|
|
323
323
|
|
|
324
|
-
|
|
325
|
-
if
|
|
326
|
-
variables
|
|
327
|
-
if variables:
|
|
328
|
-
generate_variables(variables)
|
|
324
|
+
variables = get_variables()
|
|
325
|
+
if variables:
|
|
326
|
+
generate_variables(variables)
|
|
329
327
|
|
|
330
328
|
# indicator to vscode extension that this is a polyapi-python project
|
|
331
329
|
file_path = os.path.join(os.getcwd(), ".polyapi-python")
|
|
@@ -354,8 +352,9 @@ def render_spec(spec: SpecificationDto) -> Tuple[str, str]:
|
|
|
354
352
|
function_id = spec["id"]
|
|
355
353
|
|
|
356
354
|
arguments: List[PropertySpecification] = []
|
|
357
|
-
return_type = {}
|
|
355
|
+
return_type: Any = {}
|
|
358
356
|
if spec.get("function"):
|
|
357
|
+
assert spec["function"]
|
|
359
358
|
# Handle cases where arguments might be missing or None
|
|
360
359
|
if spec["function"].get("arguments"):
|
|
361
360
|
arguments = [
|
|
@@ -11,7 +11,7 @@ polyapi/error_handler.py,sha256=I_e0iz6VM23FLVQWJljxs2NGcl_OODbi43OcbnqBlp8,2398
|
|
|
11
11
|
polyapi/exceptions.py,sha256=Zh7i7eCUhDuXEdUYjatkLFTeZkrx1BJ1P5ePgbJ9eIY,89
|
|
12
12
|
polyapi/execute.py,sha256=sjI6BMBYPSCD6UngV9DzpJIRSU6p02aShNaTXhDExtY,3457
|
|
13
13
|
polyapi/function_cli.py,sha256=H0sVrbvRBXw_xeApe2MvQw8p_xE7jVTTOU-07Dg041A,4220
|
|
14
|
-
polyapi/generate.py,sha256=
|
|
14
|
+
polyapi/generate.py,sha256=rzRb9TW5VjdqT13beIezQratdfAvE7yYWX_ODlZJTK0,16105
|
|
15
15
|
polyapi/parser.py,sha256=mdoh4pNq8pyiHE0-i6Coqj8frEXfBLRk6itpAXMrrgI,20373
|
|
16
16
|
polyapi/poly_schemas.py,sha256=T4kfZyfgVLiqLD28GmYNiHnrNx77J_HO4uzk8LUAhlo,3137
|
|
17
17
|
polyapi/prepare.py,sha256=t-Gj5SrLokUuAJ70IKY6myK_OoJ-N7SazeIMlu5cmuc,7396
|
|
@@ -24,8 +24,8 @@ polyapi/typedefs.py,sha256=MGDwWaijLNqokXF9UCHGAP-yKixOzztrH4Lsj800AJs,2328
|
|
|
24
24
|
polyapi/utils.py,sha256=1F7Dwst_PbPuUBUSxx5r8d2DHDgqHtu07QW92T_YSdw,12454
|
|
25
25
|
polyapi/variables.py,sha256=j7WWrGLr2O5SkWGxnsusnnfl25kVL3b6SQYcVGEoC8c,4277
|
|
26
26
|
polyapi/webhook.py,sha256=NTSXYOl_QqsFekWRepPyVTsV9SVkgUu0HfG1SJJDHOE,4958
|
|
27
|
-
polyapi_python-0.3.8.
|
|
28
|
-
polyapi_python-0.3.8.
|
|
29
|
-
polyapi_python-0.3.8.
|
|
30
|
-
polyapi_python-0.3.8.
|
|
31
|
-
polyapi_python-0.3.8.
|
|
27
|
+
polyapi_python-0.3.8.dev4.dist-info/licenses/LICENSE,sha256=6b_I7aPVp8JXhqQwdw7_B84Ca0S4JGjHj0sr_1VOdB4,1068
|
|
28
|
+
polyapi_python-0.3.8.dev4.dist-info/METADATA,sha256=2U-6Rfb0mdCD8T4CD7tQ26eNpoWNkrOchtGd14DbGnA,5782
|
|
29
|
+
polyapi_python-0.3.8.dev4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
30
|
+
polyapi_python-0.3.8.dev4.dist-info/top_level.txt,sha256=CEFllOnzowci_50RYJac-M54KD2IdAptFsayVVF_f04,8
|
|
31
|
+
polyapi_python-0.3.8.dev4.dist-info/RECORD,,
|
|
File without changes
|
{polyapi_python-0.3.8.dev3.dist-info → polyapi_python-0.3.8.dev4.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|