peek-python 26.0.1__tar.gz → 26.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {peek_python-26.0.1 → peek_python-26.0.2}/PKG-INFO +1 -1
- {peek_python-26.0.1 → peek_python-26.0.2}/peek/peek.py +9 -4
- {peek_python-26.0.1 → peek_python-26.0.2}/peek_python.egg-info/PKG-INFO +1 -1
- {peek_python-26.0.1 → peek_python-26.0.2}/pyproject.toml +1 -1
- {peek_python-26.0.1 → peek_python-26.0.2}/README.md +0 -0
- {peek_python-26.0.1 → peek_python-26.0.2}/peek/__init__.py +0 -0
- {peek_python-26.0.1 → peek_python-26.0.2}/peek_python.egg-info/SOURCES.txt +0 -0
- {peek_python-26.0.1 → peek_python-26.0.2}/peek_python.egg-info/dependency_links.txt +0 -0
- {peek_python-26.0.1 → peek_python-26.0.2}/peek_python.egg-info/requires.txt +0 -0
- {peek_python-26.0.1 → peek_python-26.0.2}/peek_python.egg-info/top_level.txt +0 -0
- {peek_python-26.0.1 → peek_python-26.0.2}/setup.cfg +0 -0
- {peek_python-26.0.1 → peek_python-26.0.2}/tests/test_peek.py +0 -0
|
@@ -34,7 +34,7 @@ import pprint
|
|
|
34
34
|
import builtins
|
|
35
35
|
import shutil
|
|
36
36
|
|
|
37
|
-
__version__ = "26.0.
|
|
37
|
+
__version__ = "26.0.2"
|
|
38
38
|
|
|
39
39
|
from pathlib import Path
|
|
40
40
|
|
|
@@ -503,8 +503,8 @@ class _Peek:
|
|
|
503
503
|
if this.decorator:
|
|
504
504
|
if as_str:
|
|
505
505
|
raise TypeError("as_str may not be True when peek used as decorator")
|
|
506
|
-
|
|
507
|
-
if len(args) > 1 or (len(args)==1 and not callable(args[0])):
|
|
506
|
+
|
|
507
|
+
if len(args) > 1 or (len(args) == 1 and not callable(args[0])):
|
|
508
508
|
raise TypeError("non-keyword arguments are not allowed when peek used as decorator")
|
|
509
509
|
|
|
510
510
|
this._line_number_with_filename_and_parent = f"#{line_number}{filename_name}{parent_function}"
|
|
@@ -856,7 +856,12 @@ class _Peek:
|
|
|
856
856
|
}
|
|
857
857
|
if "width" in inspect.signature(self.serialize).parameters:
|
|
858
858
|
kwargs["width"] = width
|
|
859
|
-
|
|
859
|
+
try:
|
|
860
|
+
serialized = self.serialize(obj, **kwargs)
|
|
861
|
+
except TypeError as e:
|
|
862
|
+
kwargs["sort_dicts"] = False # try without sorting (sometimes required for sympy)
|
|
863
|
+
serialized = self.serialize(obj, **kwargs)
|
|
864
|
+
return self.add_color_value(serialized.replace("\\n", "\n"))
|
|
860
865
|
|
|
861
866
|
def reset(self):
|
|
862
867
|
reset()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|