peek-python 1.4.4__tar.gz → 1.4.5__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.1
2
2
  Name: peek-python
3
- Version: 1.4.4
3
+ Version: 1.4.5
4
4
  Summary: peek - debugging and benchmarking made easy
5
5
  Author-email: Ruud van der Ham <rt.van.der.ham@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/salabim/ycecream
@@ -4,7 +4,7 @@
4
4
  # | .__/ \___| \___||_|\_\
5
5
  # |_| like print, but easy.
6
6
 
7
- __version__ = "1.4.4"
7
+ __version__ = "1.4.5"
8
8
 
9
9
  """
10
10
  See https://github.com/salabim/peek for details
@@ -208,7 +208,7 @@ shortcut_to_name = {
208
208
  def set_defaults():
209
209
  default.prefix = ""
210
210
  default.output = "stdout"
211
- default.serialize = pprint.pformat
211
+ default.serialize = pprint.pformat
212
212
  default.show_line_number = False
213
213
  default.show_time = False
214
214
  default.show_delta = False
@@ -288,7 +288,7 @@ def return_args(args, return_none):
288
288
  return args
289
289
 
290
290
 
291
- class _Peek():
291
+ class _Peek:
292
292
  def __init__(
293
293
  self,
294
294
  prefix=nv,
@@ -885,7 +885,7 @@ class _Peek():
885
885
  if "width" in inspect.signature(self.serialize).parameters:
886
886
  kwargs["width"] = width
887
887
 
888
- return self.serialize(obj, **kwargs).replace("\\n", "\n")
888
+ return self.serialize(obj, **kwargs).replace("\\n", "\n")
889
889
 
890
890
 
891
891
  codes = {}
@@ -894,5 +894,18 @@ set_defaults()
894
894
  default_pre_json = copy.copy(default)
895
895
  apply_json()
896
896
  peek = _Peek()
897
- p=peek.fork()
897
+ p = peek.fork()
898
898
 
899
+
900
+ class PeekModule(types.ModuleType):
901
+ def __call__(self, *args, **kwargs):
902
+ return peek(*args, **kwargs)
903
+
904
+ def __setattr__(self, item, value):
905
+ setattr(peek, item, value)
906
+
907
+ def __getattr__(self, item):
908
+ return getattr(peek, item)
909
+
910
+
911
+ sys.modules["peek"].__class__ = PeekModule
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: peek-python
3
- Version: 1.4.4
3
+ Version: 1.4.5
4
4
  Summary: peek - debugging and benchmarking made easy
5
5
  Author-email: Ruud van der Ham <rt.van.der.ham@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/salabim/ycecream
@@ -8,7 +8,7 @@ authors = [
8
8
  {name = "Ruud van der Ham", email = "rt.van.der.ham@gmail.com"}
9
9
  ]
10
10
  description = "peek - debugging and benchmarking made easy"
11
- version = "1.4.4"
11
+ version = "1.4.5"
12
12
  readme = "README.md"
13
13
  requires-python = ">=3.6"
14
14
  dependencies = [
File without changes
File without changes
File without changes