Skip to content

Commit ff5410e

Browse files
committed
Update readme
1 parent 278952b commit ff5410e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,17 @@ except RuntimeError as exc:
9797

9898
### Config options
9999

100-
For all the config options [see the docstring of `format()`](https://github.com/cknd/stackprinter/blob/master/stackprinter/__init__.py#L28-L149).
101-
The same config kwargs are accepted by `format()`, `show()` and `set_excepthook()`. They allow you to tweak the formatting, hide certain variables by name, skip variables in calls within certain files, and some other stuff.
100+
`format()`, `show()` and `set_excepthook()` accept a common set of keyword args. They allow you to tweak the formatting, hide certain variables by name, skip variables in calls within certain files, and some other stuff. For all the options [see the docstring of `format()`](https://github.com/cknd/stackprinter/blob/master/stackprinter/__init__.py#L28-L149).
102101

103102
```python
104103
try:
105104
something()
106105
except RuntimeError as exc:
107106
stackprinter.show(exc, suppressed_vars=[r".*secret.*"],
108107
suppressed_paths=[r"lib/python.*/site-packages/boringstuff"],
109-
truncate_vals=9001)
108+
truncate_vals=9001,
109+
style="darkbg2",
110+
)
110111
```
111112

112113
### Integration with the standard `logging` module
@@ -143,7 +144,7 @@ except:
143144
┆ TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
144145
```
145146

146-
You get this by adding a [custom formatter](https://docs.python.org/3/howto/logging-cookbook.html#customized-exception-formatting) to the logger once before using it.
147+
You can get this by adding a [custom formatter](https://docs.python.org/3/howto/logging-cookbook.html#customized-exception-formatting) to the logger once before using it.
147148

148149
```python
149150
# Set up logging
@@ -212,7 +213,7 @@ That would give you colorful tracebacks automatically every time, even in the RE
212213

213214
# Docs
214215

215-
For now, the documentation consists only of some fairly detailed docstrings, [e.g. those of `format()`](https://github.com/cknd/stackprinter/blob/master/stackprinter/__init__.py#L28-L137)
216+
For now, the documentation consists only of some fairly detailed docstrings, [e.g. those of `format()`](https://github.com/cknd/stackprinter/blob/master/stackprinter/__init__.py#L28-L149)
216217

217218
# Caveats
218219

0 commit comments

Comments
 (0)