Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 3bd3d2c

Browse files
committed
Fix filter() usage in the readme
Signed-off-by: Vadim Markovtsev <vadim@sourced.tech>
1 parent ba8393b commit 3bd3d2c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ Please, read the [getting started](https://doc.bblf.sh/user/getting-started.html
4646
from bblfsh import BblfshClient, filter
4747

4848
client = BblfshClient("0.0.0.0:9432")
49-
print(client.parse("/path/to/file.py"))
49+
uast = client.parse("/path/to/file.py").uast
50+
print(uast)
5051
# "filter' allows you to use XPath queries to filter on result nodes:
51-
print(client.filter("//Import[@roleImport and @roleDeclaration]//alias")
52+
print(filter(uast, "//Import[@roleImport and @roleDeclaration]//alias")
5253
```
5354

5455
Please read the [Babelfish clients](https://doc.bblf.sh/user/language-clients.html)

0 commit comments

Comments
 (0)