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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: peek-python
3
- Version: 26.0.1
3
+ Version: 26.0.2
4
4
  Summary: peek - like print, but easy
5
5
  Author-email: Ruud van der Ham <rt.van.der.ham@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/salabim/peek
@@ -34,7 +34,7 @@ import pprint
34
34
  import builtins
35
35
  import shutil
36
36
 
37
- __version__ = "26.0.1"
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
- return self.add_color_value(self.serialize(obj, **kwargs).replace("\\n", "\n"))
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()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: peek-python
3
- Version: 26.0.1
3
+ Version: 26.0.2
4
4
  Summary: peek - like print, but easy
5
5
  Author-email: Ruud van der Ham <rt.van.der.ham@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/salabim/peek
@@ -10,7 +10,7 @@ authors = [
10
10
  { name = "Ruud van der Ham", email = "rt.van.der.ham@gmail.com" },
11
11
  ]
12
12
  description = "peek - like print, but easy"
13
- version = "26.0.1"
13
+ version = "26.0.2"
14
14
  readme = "README.md"
15
15
  requires-python = ">=3.9"
16
16
  dependencies = [
File without changes
File without changes