Skip to content

Commit

Permalink
Remove cog example that was breaking the build
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Jun 21, 2023
1 parent 0ae8a26 commit 55ba606
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,16 @@ from click.testing import CliRunner
import pathlib
from symbex.cli import cli
def sorted_chunks(text):
chunks = text.strip().split("\n\n")
chunks.sort()
return "\n\n".join(chunks)
path = pathlib.Path("symbex").resolve()
runner = CliRunner()
result = runner.invoke(cli, ["-s", "-d", str(path)])
# Need a consistent sort order
chunks = result.stdout.strip().split("\n\n")
chunks.sort()
cog.out(
"```python\n{}\n```\n".format("\n\n".join(chunks))
"```python\n{}\n```\n".format(sorted_chunks(result.output))
)
]]] -->
```python
Expand Down Expand Up @@ -223,17 +225,10 @@ So to both enable import paths and suppress File comments, use `-in` as a shortc
symbex -in match
```
Output:
<!-- [[[cog
result = runner.invoke(cli, ["-in", str(path / "lib.py"), "match"])
cog.out(
"```python\n{}\n```\n".format(result.stdout.strip())
)
]]] -->
```python
# from symbex.lib import match
def match(name: str, symbols: Iterable[str]) -> bool
```
<!-- [[[end]]] -->

To include docstrings in those signatures, use `--docstrings`:
```bash
Expand Down

0 comments on commit 55ba606

Please sign in to comment.