Skip to content

Commit 08b2d49

Browse files
committed
Fix exec error in markdown
Since test_can_run_docs_code_snippets will run the snippets in markdown, fix the undefined error in the snippets.
1 parent c151ddc commit 08b2d49

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/dev/serialization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ print(text)
3636
The JSON can also be written to a file:
3737

3838
```python
39-
cirq.to_json(obj, filepath)
39+
cirq.to_json(obj, '<filepath>.json')
4040
```
4141

4242
Or read back in from a file:
4343

4444
```python
45-
obj = cirq.read_json(filepath)
45+
obj = cirq.read_json('<filepath>.json')
4646
```
4747

4848
Or read back in from a string:

docs/dev/style.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ Note that type annotations may need to be quoted when they act in expressions
108108
that are evaluated at the import time, for example,
109109

110110
```python
111+
from typing import Union
112+
111113
MOMENT_OR_OPERATION = Union['cirq.Moment', 'cirq.Operation']
112114
```
113115

0 commit comments

Comments
 (0)