invocation-tree 0.0.37__tar.gz → 0.0.38__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: invocation_tree
3
- Version: 0.0.37
3
+ Version: 0.0.38
4
4
  Summary: Generates an invocation tree of functions calls.
5
5
  Author-email: Bas Terwijn <bterwijn@gmail.com>
6
6
  License-Expression: BSD-2-Clause
@@ -10,7 +10,7 @@ import functools
10
10
 
11
11
  import invocation_tree.regex_set as regset
12
12
 
13
- __version__ = "0.0.37"
13
+ __version__ = "0.0.38"
14
14
  __author__ = 'Bas Terwijn'
15
15
 
16
16
  # colors dark
@@ -28,11 +28,11 @@ color_active_dark = '#1d1d1d'
28
28
  color_returned_dark = '#997777'
29
29
 
30
30
  # color placeholders
31
- foreground_color_PH = 'foreground_color_PH'
32
- background_color_PH = 'background_color_PH'
33
- color_paused_PH = 'color_paused_PH'
34
- color_active_PH = 'color_active_PH'
35
- color_returned_PH = 'color_returned_PH'
31
+ foreground_color_PH = '<foreground_color_PH>'
32
+ background_color_PH = '<background_color_PH>'
33
+ color_paused_PH = '<color_paused_PH>'
34
+ color_active_PH = '<color_active_PH>'
35
+ color_returned_PH = '<color_returned_PH>'
36
36
 
37
37
 
38
38
  def highlight_diff(str1, str2):
@@ -232,14 +232,14 @@ class Invocation_Tree:
232
232
  tree_node.is_returned = is_returned
233
233
  return_value = tree_node.return_value
234
234
  border = 1
235
- color = self.color_paused
235
+ color = color_paused_PH
236
236
  if active:
237
- color = self.color_active
237
+ color = color_active_PH
238
238
  border = 3
239
239
  if is_returned:
240
- color = self.color_returned
240
+ color = color_returned_PH
241
241
  alignment = 'ALIGN="LEFT" BALIGN="LEFT"'
242
- table = f'<\n<TABLE BORDER="{str(border)}" COLOR="{foreground_color_PH}" CELLBORDER="0" CELLSPACING="0" BGCOLOR="{color}">\n <TR>'
242
+ table = f'<\n<TABLE BORDER="{str(border)}" COLOR={foreground_color_PH} CELLBORDER="0" CELLSPACING="0" BGCOLOR={color}>\n <TR>'
243
243
  class_fun_name = get_class_function_name(tree_node.frame)
244
244
  local_vars = tree_node.frame.f_locals
245
245
  hightlighted_content = self.get_hightlighted_content(tree_node, class_fun_name, class_fun_name, use_old_content)
@@ -318,10 +318,7 @@ class Invocation_Tree:
318
318
  graph_str = self.uncolored_graph.source
319
319
 
320
320
  def replace_color(token, value):
321
- # DOT attrs like fontcolor=... need quoted #RRGGBB values.
322
- result = graph_str.replace(f'={token}', f'="{value}"')
323
- # HTML-like labels contain quoted placeholder values already.
324
- return result.replace(token, value)
321
+ return graph_str.replace(f'{token}', f'"{value}"')
325
322
 
326
323
  graph_str = replace_color(foreground_color_PH, self.foreground_color)
327
324
  graph_str = replace_color(background_color_PH, self.background_color)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: invocation_tree
3
- Version: 0.0.37
3
+ Version: 0.0.38
4
4
  Summary: Generates an invocation tree of functions calls.
5
5
  Author-email: Bas Terwijn <bterwijn@gmail.com>
6
6
  License-Expression: BSD-2-Clause
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "invocation_tree"
7
- version = "0.0.37"
7
+ version = "0.0.38"
8
8
  description = "Generates an invocation tree of functions calls."
9
9
  authors = [
10
10
  {name = "Bas Terwijn", email = "bterwijn@gmail.com"}