Skip to content

Commit adc2fa6

Browse files
committed
correct demo
1 parent 2f8bc9a commit adc2fa6

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ That's only the tip of the iceberg, for example `demo.py </demo.py>`_:
4848
outputs:
4949

5050
.. image:: ./demo.py.png
51+
:align: center
5152

5253
Usage without Import
5354
--------------------

demo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
from devtools import debug
12
import numpy as np
23

34
data = {
45
'foo': np.array(range(20)),
56
'bar': {'apple', 'banana', 'carrot', 'grapefruit'},
6-
'spam': [{'a': i, 'b': (i for i in range(3))} for i in range(3)],
7+
'spam': [{'a': i, 'b': (ii for ii in range(i))} for i in range(3)],
78
'sentence': 'this is just a boring sentence.\n' * 4
89
}
910

demo.py.png

271 Bytes
Loading

devtools/debug.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def env_true(var_name, alt='FALSE'):
2121
pformat = PrettyFormat(
2222
indent_step=int(os.getenv('PY_DEVTOOLS_INDENT', 4)),
2323
simple_cutoff=int(os.getenv('PY_DEVTOOLS_SIMPLE_CUTOFF', 10)),
24-
width=int(os.getenv('PY_DEVTOOLS_SIMPLE_TERM_WIDTH', 80)),
24+
width=int(os.getenv('PY_DEVTOOLS_SIMPLE_TERM_WIDTH', 120)),
2525
yield_from_generators=env_true('PY_DEVTOOLS_YIELD_FROM_GEN', 'TRUE'),
2626
)
2727

0 commit comments

Comments
 (0)