symbex 1.4__tar.gz → 1.4.1__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {symbex-1.4 → symbex-1.4.1}/PKG-INFO +22 -6
- {symbex-1.4 → symbex-1.4.1}/README.md +2 -2
- {symbex-1.4 → symbex-1.4.1}/setup.py +1 -1
- {symbex-1.4 → symbex-1.4.1}/symbex/cli.py +1 -9
- {symbex-1.4 → symbex-1.4.1}/symbex.egg-info/PKG-INFO +22 -6
- {symbex-1.4 → symbex-1.4.1}/tests/test_symbex.py +5 -3
- {symbex-1.4 → symbex-1.4.1}/LICENSE +0 -0
- {symbex-1.4 → symbex-1.4.1}/setup.cfg +0 -0
- {symbex-1.4 → symbex-1.4.1}/symbex/__init__.py +0 -0
- {symbex-1.4 → symbex-1.4.1}/symbex/__main__.py +0 -0
- {symbex-1.4 → symbex-1.4.1}/symbex/lib.py +0 -0
- {symbex-1.4 → symbex-1.4.1}/symbex.egg-info/SOURCES.txt +0 -0
- {symbex-1.4 → symbex-1.4.1}/symbex.egg-info/dependency_links.txt +0 -0
- {symbex-1.4 → symbex-1.4.1}/symbex.egg-info/entry_points.txt +0 -0
- {symbex-1.4 → symbex-1.4.1}/symbex.egg-info/requires.txt +0 -0
- {symbex-1.4 → symbex-1.4.1}/symbex.egg-info/top_level.txt +0 -0
- {symbex-1.4 → symbex-1.4.1}/tests/test_filters.py +0 -0
- {symbex-1.4 → symbex-1.4.1}/tests/test_imports.py +0 -0
- {symbex-1.4 → symbex-1.4.1}/tests/test_output.py +0 -0
- {symbex-1.4 → symbex-1.4.1}/tests/test_replace.py +0 -0
- {symbex-1.4 → symbex-1.4.1}/tests/test_symbols.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: symbex
|
3
|
-
Version: 1.4
|
3
|
+
Version: 1.4.1
|
4
4
|
Summary: Find the Python code for specified symbols
|
5
5
|
Home-page: https://github.com/simonw/symbex
|
6
6
|
Author: Simon Willison
|
@@ -10,10 +10,26 @@ Project-URL: CI, https://github.com/simonw/symbex/actions
|
|
10
10
|
Project-URL: Changelog, https://github.com/simonw/symbex/releases
|
11
11
|
Requires-Python: >=3.8
|
12
12
|
Description-Content-Type: text/markdown
|
13
|
-
Provides-Extra: test
|
14
13
|
License-File: LICENSE
|
15
|
-
|
16
|
-
|
14
|
+
Requires-Dist: click
|
15
|
+
Provides-Extra: test
|
16
|
+
Requires-Dist: pytest; extra == "test"
|
17
|
+
Requires-Dist: pytest-icdiff; extra == "test"
|
18
|
+
Requires-Dist: cogapp; extra == "test"
|
19
|
+
Requires-Dist: PyYAML; extra == "test"
|
20
|
+
Requires-Dist: ruff; extra == "test"
|
21
|
+
Dynamic: author
|
22
|
+
Dynamic: description
|
23
|
+
Dynamic: description-content-type
|
24
|
+
Dynamic: home-page
|
25
|
+
Dynamic: license
|
26
|
+
Dynamic: project-url
|
27
|
+
Dynamic: provides-extra
|
28
|
+
Dynamic: requires-dist
|
29
|
+
Dynamic: requires-python
|
30
|
+
Dynamic: summary
|
31
|
+
|
32
|
+
# Symbex
|
17
33
|
|
18
34
|
[](https://pypi.org/project/symbex/)
|
19
35
|
[](https://github.com/simonw/symbex/releases)
|
@@ -22,7 +38,7 @@ License-File: LICENSE
|
|
22
38
|
|
23
39
|
Find the Python code for specified symbols
|
24
40
|
|
25
|
-
Read [
|
41
|
+
Read [Symbex: search Python code for functions and classes, then pipe them into a LLM](https://simonwillison.net/2023/Jun/18/symbex/) for background on this project.
|
26
42
|
|
27
43
|
## Installation
|
28
44
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# Symbex
|
2
2
|
|
3
3
|
[](https://pypi.org/project/symbex/)
|
4
4
|
[](https://github.com/simonw/symbex/releases)
|
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
Find the Python code for specified symbols
|
9
9
|
|
10
|
-
Read [
|
10
|
+
Read [Symbex: search Python code for functions and classes, then pipe them into a LLM](https://simonwillison.net/2023/Jun/18/symbex/) for background on this project.
|
11
11
|
|
12
12
|
## Installation
|
13
13
|
|
@@ -396,7 +396,7 @@ def cli(
|
|
396
396
|
for directory in directories:
|
397
397
|
for path in pathlib.Path(directory).rglob("*.py"):
|
398
398
|
# Skip if path is inside any of 'excludes'
|
399
|
-
if any(
|
399
|
+
if any(path.resolve().is_relative_to(exclude) for exclude in excludes):
|
400
400
|
continue
|
401
401
|
if path.is_file():
|
402
402
|
yield path
|
@@ -601,14 +601,6 @@ def cli(
|
|
601
601
|
filepath.write_text(new, "utf-8")
|
602
602
|
|
603
603
|
|
604
|
-
def is_subpath(path: pathlib.Path, parent: pathlib.Path) -> bool:
|
605
|
-
try:
|
606
|
-
path.relative_to(parent)
|
607
|
-
return True
|
608
|
-
except ValueError:
|
609
|
-
return False
|
610
|
-
|
611
|
-
|
612
604
|
def is_dunder(name):
|
613
605
|
return name.startswith("__") and name.endswith("__")
|
614
606
|
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: symbex
|
3
|
-
Version: 1.4
|
3
|
+
Version: 1.4.1
|
4
4
|
Summary: Find the Python code for specified symbols
|
5
5
|
Home-page: https://github.com/simonw/symbex
|
6
6
|
Author: Simon Willison
|
@@ -10,10 +10,26 @@ Project-URL: CI, https://github.com/simonw/symbex/actions
|
|
10
10
|
Project-URL: Changelog, https://github.com/simonw/symbex/releases
|
11
11
|
Requires-Python: >=3.8
|
12
12
|
Description-Content-Type: text/markdown
|
13
|
-
Provides-Extra: test
|
14
13
|
License-File: LICENSE
|
15
|
-
|
16
|
-
|
14
|
+
Requires-Dist: click
|
15
|
+
Provides-Extra: test
|
16
|
+
Requires-Dist: pytest; extra == "test"
|
17
|
+
Requires-Dist: pytest-icdiff; extra == "test"
|
18
|
+
Requires-Dist: cogapp; extra == "test"
|
19
|
+
Requires-Dist: PyYAML; extra == "test"
|
20
|
+
Requires-Dist: ruff; extra == "test"
|
21
|
+
Dynamic: author
|
22
|
+
Dynamic: description
|
23
|
+
Dynamic: description-content-type
|
24
|
+
Dynamic: home-page
|
25
|
+
Dynamic: license
|
26
|
+
Dynamic: project-url
|
27
|
+
Dynamic: provides-extra
|
28
|
+
Dynamic: requires-dist
|
29
|
+
Dynamic: requires-python
|
30
|
+
Dynamic: summary
|
31
|
+
|
32
|
+
# Symbex
|
17
33
|
|
18
34
|
[](https://pypi.org/project/symbex/)
|
19
35
|
[](https://github.com/simonw/symbex/releases)
|
@@ -22,7 +38,7 @@ License-File: LICENSE
|
|
22
38
|
|
23
39
|
Find the Python code for specified symbols
|
24
40
|
|
25
|
-
Read [
|
41
|
+
Read [Symbex: search Python code for functions and classes, then pipe them into a LLM](https://simonwillison.net/2023/Jun/18/symbex/) for background on this project.
|
26
42
|
|
27
43
|
## Installation
|
28
44
|
|
@@ -89,6 +89,8 @@ def directory_full_of_code(tmpdir):
|
|
89
89
|
["baz", "-d", "nested.py", "-x", "nested.py/x/", "--silent"],
|
90
90
|
"",
|
91
91
|
),
|
92
|
+
# -x to exclude top level directory
|
93
|
+
(["baz", "-x", "nested.py", "--silent"], ""),
|
92
94
|
# Classes
|
93
95
|
(
|
94
96
|
["MyClass", "--silent"],
|
@@ -164,10 +166,10 @@ def test_fixture(directory_full_of_code, monkeypatch, args, expected):
|
|
164
166
|
'def baz(delimiter=", ", type=str):'
|
165
167
|
),
|
166
168
|
),
|
167
|
-
#
|
169
|
+
# Tests for the --module option
|
168
170
|
(
|
169
|
-
["-m", "
|
170
|
-
("
|
171
|
+
["-m", "contextlib", "suppress", "--silent", "-sn"],
|
172
|
+
("class suppress(AbstractContextManager):"),
|
171
173
|
),
|
172
174
|
),
|
173
175
|
)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|