mirror of
https://github.com/cool-RR/PySnooper.git
synced 2026-07-20 01:44:10 +00:00
Add MAX_VARIABLE_LENGTH constant
This commit is contained in:
parent
3279c00b9e
commit
4419548374
2 changed files with 5 additions and 3 deletions
|
|
@ -9,10 +9,12 @@ import datetime as datetime_module
|
|||
|
||||
import six
|
||||
|
||||
MAX_VARIABLE_LENGTH = 100
|
||||
|
||||
def get_shortish_repr(item):
|
||||
r = repr(item)
|
||||
if len(r) > 100:
|
||||
r = '{truncated_r}...'.format(truncated_r=r[:97])
|
||||
if len(r) > MAX_VARIABLE_LENGTH:
|
||||
r = '{truncated_r}...'.format(truncated_r=r[:MAX_VARIABLE_LENGTH])
|
||||
return r
|
||||
|
||||
def get_local_reprs(frame, variables=()):
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -5,7 +5,7 @@ import setuptools
|
|||
|
||||
setuptools.setup(
|
||||
name='PySnooper',
|
||||
version='0.0.8',
|
||||
version='0.0.9',
|
||||
author='Ram Rachum',
|
||||
author_email='ram@rachum.com',
|
||||
description="A poor man's debugger for Python.",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue