Skip to content

Commit bfcc576

Browse files
committed
docs: update examples to remove deprecated print_result parameter
1 parent 74b8d73 commit bfcc576

3 files changed

Lines changed: 10 additions & 15 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ uv add "git+https://github.com/zigai/interfacy.git"
4646
```python
4747
from interfacy import Interfacy
4848

49-
def greet(name: str, times: int = 1) -> str:
50-
"""Return a greeting."""
51-
return " ".join([f"Hello, {name}!" for _ in range(times)])
49+
def greet(name: str, times: int = 1) -> None:
50+
"""Print a greeting."""
51+
print(" ".join([f"Hello, {name}!" for _ in range(times)]))
5252

5353
if __name__ == "__main__":
54-
Interfacy(print_result=True).run(greet)
54+
Interfacy().run(greet)
5555
```
5656

5757
```text

docs/api/parsers.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
# Parsers
22

3-
`Interfacy` is the programmatic entry point. It defaults to the argparse
4-
backend. Pass `backend="click"` when you want Click integration.
3+
`Interfacy` is the programmatic entry point.
54

65
## Interfacy
76

87
```python
98
from interfacy import Interfacy
109

11-
Interfacy(print_result=True).run(main)
12-
Interfacy(backend="click", print_result=True).run(main)
10+
Interfacy().run(main)
1311
```
1412

1513
```{eval-rst}

interfacy/.agents/skills/interfacy/SKILL.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,17 @@ uv add interfacy
2626
```python
2727
from interfacy import Interfacy
2828

29-
def greet(name: str, times: int = 1) -> str:
30-
"""Return a greeting.
29+
def greet(name: str, times: int = 1) -> None:
30+
"""Print a greeting.
3131
3232
Args:
3333
name: Person to greet.
3434
times: Number of greetings.
35-
36-
Returns:
37-
Greeting text.
3835
"""
39-
return " ".join(f"Hello, {name}!" for _ in range(times))
36+
print(" ".join(f"Hello, {name}!" for _ in range(times)))
4037

4138
if __name__ == "__main__":
42-
Interfacy(print_result=True).run(greet)
39+
Interfacy().run(greet)
4340
```
4441

4542
```text

0 commit comments

Comments
 (0)