symbex 0.3.1__py3-none-any.whl → 0.3.2__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- symbex/lib.py +8 -1
- {symbex-0.3.1.dist-info → symbex-0.3.2.dist-info}/METADATA +2 -2
- symbex-0.3.2.dist-info/RECORD +10 -0
- symbex-0.3.1.dist-info/RECORD +0 -10
- {symbex-0.3.1.dist-info → symbex-0.3.2.dist-info}/LICENSE +0 -0
- {symbex-0.3.1.dist-info → symbex-0.3.2.dist-info}/WHEEL +0 -0
- {symbex-0.3.1.dist-info → symbex-0.3.2.dist-info}/entry_points.txt +0 -0
- {symbex-0.3.1.dist-info → symbex-0.3.2.dist-info}/top_level.txt +0 -0
symbex/lib.py
CHANGED
@@ -109,7 +109,14 @@ def function_definition(function_node: AST):
|
|
109
109
|
# if defaults has 2 and args has 3 then those
|
110
110
|
# defaults correspond to the last two args
|
111
111
|
defaults = [None] * (len(all_args) - len(function_node.args.defaults))
|
112
|
-
|
112
|
+
for default in function_node.args.defaults:
|
113
|
+
try:
|
114
|
+
value = literal_eval(default)
|
115
|
+
if isinstance(value, str):
|
116
|
+
value = f'"{value}"'
|
117
|
+
except ValueError:
|
118
|
+
value = getattr(default, "id", "...")
|
119
|
+
defaults.append(value)
|
113
120
|
|
114
121
|
arguments = []
|
115
122
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: symbex
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.2
|
4
4
|
Summary: Find the Python code for specified symbols
|
5
5
|
Home-page: https://github.com/simonw/symbex
|
6
6
|
Author: Simon Willison
|
@@ -136,7 +136,7 @@ cog.out(
|
|
136
136
|
# File: symbex/cli.py Line: 37
|
137
137
|
def cli(symbols, files, directories, signatures, silent)
|
138
138
|
|
139
|
-
# File: symbex/lib.py Line:
|
139
|
+
# File: symbex/lib.py Line: 161
|
140
140
|
def class_definition(class_def)
|
141
141
|
|
142
142
|
# File: symbex/lib.py Line: 32
|
@@ -0,0 +1,10 @@
|
|
1
|
+
symbex/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
+
symbex/__main__.py,sha256=8hDtWlaFZK24KhfNq_ZKgtXqYHsDQDetukOCMlsbW0Q,59
|
3
|
+
symbex/cli.py,sha256=tWzT49q-fPN34HQH2sEFHBV3MXFKy9J5eh2EzOo5_CA,2857
|
4
|
+
symbex/lib.py,sha256=_IwiAfr9rCAe4ptdNt6o6MMibLHnwBmqpmgYRdRmEa4,6499
|
5
|
+
symbex-0.3.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
6
|
+
symbex-0.3.2.dist-info/METADATA,sha256=xlQ1koJSuZ6luJeC1WtNrU-D5g-dz82Br1NPYZ3yUXc,5695
|
7
|
+
symbex-0.3.2.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
8
|
+
symbex-0.3.2.dist-info/entry_points.txt,sha256=YgMSEfEGqNMHM9RysFObH8lkQKVZKyymKLnXbVue_Uk,42
|
9
|
+
symbex-0.3.2.dist-info/top_level.txt,sha256=qwle8HjAaYgpdMIHlJcTcN4gaG4wmDqUvkt54beTBTs,7
|
10
|
+
symbex-0.3.2.dist-info/RECORD,,
|
symbex-0.3.1.dist-info/RECORD
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
symbex/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
symbex/__main__.py,sha256=8hDtWlaFZK24KhfNq_ZKgtXqYHsDQDetukOCMlsbW0Q,59
|
3
|
-
symbex/cli.py,sha256=tWzT49q-fPN34HQH2sEFHBV3MXFKy9J5eh2EzOo5_CA,2857
|
4
|
-
symbex/lib.py,sha256=MtJ2w27BpQ0kcaNqgJe5NSU-tAKTLkFb0H-Qc2DbM-0,6298
|
5
|
-
symbex-0.3.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
6
|
-
symbex-0.3.1.dist-info/METADATA,sha256=5raCapl-Mzra0akIeg_PRW_NmYFp-RGIPn_YWW3YdVU,5695
|
7
|
-
symbex-0.3.1.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
8
|
-
symbex-0.3.1.dist-info/entry_points.txt,sha256=YgMSEfEGqNMHM9RysFObH8lkQKVZKyymKLnXbVue_Uk,42
|
9
|
-
symbex-0.3.1.dist-info/top_level.txt,sha256=qwle8HjAaYgpdMIHlJcTcN4gaG4wmDqUvkt54beTBTs,7
|
10
|
-
symbex-0.3.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|