Skip to content

Commit

Permalink
docs: update multi-file compilation lang tour examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Peefy committed Oct 11, 2024
1 parent 7a1eca2 commit d996439
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
5 changes: 3 additions & 2 deletions docs/reference/lang/tour.md
Original file line number Diff line number Diff line change
Expand Up @@ -3114,7 +3114,7 @@ _model2 = Model {
backend.k

```python
import yaml
import manifests
schema Backend:
apiVersion: str = "v1"
Expand All @@ -3136,7 +3136,8 @@ _backends = [Backend {
spec.selector.matchLabels: model.labels
spec.replicas = model.replicas
} for model in Model.instances()] # Schema Model is defined in model.k
print("---\n".join([yaml.encode(_b, ignore_private=True) for _b in _backends]))
manifests.yaml_stream(_backends)
```

The command is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3043,7 +3043,7 @@ _model2 = Model {
backend.k

```python
import yaml
import manifests
schema Backend:
apiVersion: str = "v1"
Expand All @@ -3065,7 +3065,8 @@ _backends = [Backend {
spec.selector.matchLabels: model.labels
spec.replicas = model.replicas
} for model in Model.instances()] # Schema Model is defined in model.k
print("---\n".join([yaml.encode(_b, ignore_private=True) for _b in _backends]))
manifests.yaml_stream(_backends)
```

命令为:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3043,7 +3043,7 @@ _model2 = Model {
backend.k

```python
import yaml
import manifests
schema Backend:
apiVersion: str = "v1"
Expand All @@ -3065,7 +3065,8 @@ _backends = [Backend {
spec.selector.matchLabels: model.labels
spec.replicas = model.replicas
} for model in Model.instances()] # Schema Model is defined in model.k
print("---\n".join([yaml.encode(_b, ignore_private=True) for _b in _backends]))
manifests.yaml_stream(_backends)
```

命令为:
Expand Down
5 changes: 3 additions & 2 deletions versioned_docs/version-0.10/reference/lang/tour.md
Original file line number Diff line number Diff line change
Expand Up @@ -3114,7 +3114,7 @@ _model2 = Model {
backend.k

```python
import yaml
import manifests
schema Backend:
apiVersion: str = "v1"
Expand All @@ -3136,7 +3136,8 @@ _backends = [Backend {
spec.selector.matchLabels: model.labels
spec.replicas = model.replicas
} for model in Model.instances()] # Schema Model is defined in model.k
print("---\n".join([yaml.encode(_b, ignore_private=True) for _b in _backends]))
manifests.yaml_stream(_backends)
```

The command is
Expand Down

0 comments on commit d996439

Please sign in to comment.