annet 0.16.24__tar.gz → 0.16.26__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.

Potentially problematic release.


This version of annet might be problematic. Click here for more details.

Files changed (180) hide show
  1. {annet-0.16.24/annet.egg-info → annet-0.16.26}/PKG-INFO +1 -1
  2. {annet-0.16.24 → annet-0.16.26}/annet/annlib/jsontools.py +2 -1
  3. {annet-0.16.24 → annet-0.16.26}/annet/annlib/patching.py +50 -14
  4. {annet-0.16.24 → annet-0.16.26/annet.egg-info}/PKG-INFO +1 -1
  5. {annet-0.16.24 → annet-0.16.26}/AUTHORS +0 -0
  6. {annet-0.16.24 → annet-0.16.26}/LICENSE +0 -0
  7. {annet-0.16.24 → annet-0.16.26}/MANIFEST.in +0 -0
  8. {annet-0.16.24 → annet-0.16.26}/README.md +0 -0
  9. {annet-0.16.24 → annet-0.16.26}/annet/__init__.py +0 -0
  10. {annet-0.16.24 → annet-0.16.26}/annet/adapters/__init__.py +0 -0
  11. {annet-0.16.24 → annet-0.16.26}/annet/adapters/fetchers/__init__.py +0 -0
  12. {annet-0.16.24 → annet-0.16.26}/annet/adapters/fetchers/stub/__init__.py +0 -0
  13. {annet-0.16.24 → annet-0.16.26}/annet/adapters/fetchers/stub/fetcher.py +0 -0
  14. {annet-0.16.24 → annet-0.16.26}/annet/adapters/file/__init__.py +0 -0
  15. {annet-0.16.24 → annet-0.16.26}/annet/adapters/file/provider.py +0 -0
  16. {annet-0.16.24 → annet-0.16.26}/annet/adapters/netbox/__init__.py +0 -0
  17. {annet-0.16.24 → annet-0.16.26}/annet/adapters/netbox/common/__init__.py +0 -0
  18. {annet-0.16.24 → annet-0.16.26}/annet/adapters/netbox/common/client.py +0 -0
  19. {annet-0.16.24 → annet-0.16.26}/annet/adapters/netbox/common/manufacturer.py +0 -0
  20. {annet-0.16.24 → annet-0.16.26}/annet/adapters/netbox/common/models.py +0 -0
  21. {annet-0.16.24 → annet-0.16.26}/annet/adapters/netbox/common/query.py +0 -0
  22. {annet-0.16.24 → annet-0.16.26}/annet/adapters/netbox/common/status_client.py +0 -0
  23. {annet-0.16.24 → annet-0.16.26}/annet/adapters/netbox/common/storage_opts.py +0 -0
  24. {annet-0.16.24 → annet-0.16.26}/annet/adapters/netbox/provider.py +0 -0
  25. {annet-0.16.24 → annet-0.16.26}/annet/adapters/netbox/v24/__init__.py +0 -0
  26. {annet-0.16.24 → annet-0.16.26}/annet/adapters/netbox/v24/storage.py +0 -0
  27. {annet-0.16.24 → annet-0.16.26}/annet/adapters/netbox/v37/__init__.py +0 -0
  28. {annet-0.16.24 → annet-0.16.26}/annet/adapters/netbox/v37/storage.py +0 -0
  29. {annet-0.16.24 → annet-0.16.26}/annet/annet.py +0 -0
  30. {annet-0.16.24 → annet-0.16.26}/annet/annlib/__init__.py +0 -0
  31. {annet-0.16.24 → annet-0.16.26}/annet/annlib/command.py +0 -0
  32. {annet-0.16.24 → annet-0.16.26}/annet/annlib/diff.py +0 -0
  33. {annet-0.16.24 → annet-0.16.26}/annet/annlib/errors.py +0 -0
  34. {annet-0.16.24 → annet-0.16.26}/annet/annlib/filter_acl.py +0 -0
  35. {annet-0.16.24 → annet-0.16.26}/annet/annlib/lib.py +0 -0
  36. {annet-0.16.24 → annet-0.16.26}/annet/annlib/netdev/__init__.py +0 -0
  37. {annet-0.16.24 → annet-0.16.26}/annet/annlib/netdev/db.py +0 -0
  38. {annet-0.16.24 → annet-0.16.26}/annet/annlib/netdev/devdb/__init__.py +0 -0
  39. {annet-0.16.24 → annet-0.16.26}/annet/annlib/netdev/devdb/data/devdb.json +0 -0
  40. {annet-0.16.24 → annet-0.16.26}/annet/annlib/netdev/views/__init__.py +0 -0
  41. {annet-0.16.24 → annet-0.16.26}/annet/annlib/netdev/views/dump.py +0 -0
  42. {annet-0.16.24 → annet-0.16.26}/annet/annlib/netdev/views/hardware.py +0 -0
  43. {annet-0.16.24 → annet-0.16.26}/annet/annlib/output.py +0 -0
  44. {annet-0.16.24 → annet-0.16.26}/annet/annlib/rbparser/__init__.py +0 -0
  45. {annet-0.16.24 → annet-0.16.26}/annet/annlib/rbparser/acl.py +0 -0
  46. {annet-0.16.24 → annet-0.16.26}/annet/annlib/rbparser/deploying.py +0 -0
  47. {annet-0.16.24 → annet-0.16.26}/annet/annlib/rbparser/ordering.py +0 -0
  48. {annet-0.16.24 → annet-0.16.26}/annet/annlib/rbparser/platform.py +0 -0
  49. {annet-0.16.24 → annet-0.16.26}/annet/annlib/rbparser/syntax.py +0 -0
  50. {annet-0.16.24 → annet-0.16.26}/annet/annlib/rulebook/__init__.py +0 -0
  51. {annet-0.16.24 → annet-0.16.26}/annet/annlib/rulebook/common.py +0 -0
  52. {annet-0.16.24 → annet-0.16.26}/annet/annlib/tabparser.py +0 -0
  53. {annet-0.16.24 → annet-0.16.26}/annet/annlib/types.py +0 -0
  54. {annet-0.16.24 → annet-0.16.26}/annet/api/__init__.py +0 -0
  55. {annet-0.16.24 → annet-0.16.26}/annet/argparse.py +0 -0
  56. {annet-0.16.24 → annet-0.16.26}/annet/bgp_models.py +0 -0
  57. {annet-0.16.24 → annet-0.16.26}/annet/cli.py +0 -0
  58. {annet-0.16.24 → annet-0.16.26}/annet/cli_args.py +0 -0
  59. {annet-0.16.24 → annet-0.16.26}/annet/configs/context.yml +0 -0
  60. {annet-0.16.24 → annet-0.16.26}/annet/configs/logging.yaml +0 -0
  61. {annet-0.16.24 → annet-0.16.26}/annet/connectors.py +0 -0
  62. {annet-0.16.24 → annet-0.16.26}/annet/deploy.py +0 -0
  63. {annet-0.16.24 → annet-0.16.26}/annet/diff.py +0 -0
  64. {annet-0.16.24 → annet-0.16.26}/annet/executor.py +0 -0
  65. {annet-0.16.24 → annet-0.16.26}/annet/filtering.py +0 -0
  66. {annet-0.16.24 → annet-0.16.26}/annet/gen.py +0 -0
  67. {annet-0.16.24 → annet-0.16.26}/annet/generators/__init__.py +0 -0
  68. {annet-0.16.24 → annet-0.16.26}/annet/generators/base.py +0 -0
  69. {annet-0.16.24 → annet-0.16.26}/annet/generators/common/__init__.py +0 -0
  70. {annet-0.16.24 → annet-0.16.26}/annet/generators/common/initial.py +0 -0
  71. {annet-0.16.24 → annet-0.16.26}/annet/generators/entire.py +0 -0
  72. {annet-0.16.24 → annet-0.16.26}/annet/generators/exceptions.py +0 -0
  73. {annet-0.16.24 → annet-0.16.26}/annet/generators/jsonfragment.py +0 -0
  74. {annet-0.16.24 → annet-0.16.26}/annet/generators/partial.py +0 -0
  75. {annet-0.16.24 → annet-0.16.26}/annet/generators/perf.py +0 -0
  76. {annet-0.16.24 → annet-0.16.26}/annet/generators/ref.py +0 -0
  77. {annet-0.16.24 → annet-0.16.26}/annet/generators/result.py +0 -0
  78. {annet-0.16.24 → annet-0.16.26}/annet/hardware.py +0 -0
  79. {annet-0.16.24 → annet-0.16.26}/annet/implicit.py +0 -0
  80. {annet-0.16.24 → annet-0.16.26}/annet/lib.py +0 -0
  81. {annet-0.16.24 → annet-0.16.26}/annet/mesh/__init__.py +0 -0
  82. {annet-0.16.24 → annet-0.16.26}/annet/mesh/basemodel.py +0 -0
  83. {annet-0.16.24 → annet-0.16.26}/annet/mesh/device_models.py +0 -0
  84. {annet-0.16.24 → annet-0.16.26}/annet/mesh/executor.py +0 -0
  85. {annet-0.16.24 → annet-0.16.26}/annet/mesh/match_args.py +0 -0
  86. {annet-0.16.24 → annet-0.16.26}/annet/mesh/models_converter.py +0 -0
  87. {annet-0.16.24 → annet-0.16.26}/annet/mesh/peer_models.py +0 -0
  88. {annet-0.16.24 → annet-0.16.26}/annet/mesh/registry.py +0 -0
  89. {annet-0.16.24 → annet-0.16.26}/annet/output.py +0 -0
  90. {annet-0.16.24 → annet-0.16.26}/annet/parallel.py +0 -0
  91. {annet-0.16.24 → annet-0.16.26}/annet/patching.py +0 -0
  92. {annet-0.16.24 → annet-0.16.26}/annet/reference.py +0 -0
  93. {annet-0.16.24 → annet-0.16.26}/annet/rpl/__init__.py +0 -0
  94. {annet-0.16.24 → annet-0.16.26}/annet/rpl/action.py +0 -0
  95. {annet-0.16.24 → annet-0.16.26}/annet/rpl/condition.py +0 -0
  96. {annet-0.16.24 → annet-0.16.26}/annet/rpl/match_builder.py +0 -0
  97. {annet-0.16.24 → annet-0.16.26}/annet/rpl/policy.py +0 -0
  98. {annet-0.16.24 → annet-0.16.26}/annet/rpl/result.py +0 -0
  99. {annet-0.16.24 → annet-0.16.26}/annet/rpl/routemap.py +0 -0
  100. {annet-0.16.24 → annet-0.16.26}/annet/rpl/statement_builder.py +0 -0
  101. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/__init__.py +0 -0
  102. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/arista/__init__.py +0 -0
  103. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/arista/iface.py +0 -0
  104. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/aruba/__init__.py +0 -0
  105. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/aruba/ap_env.py +0 -0
  106. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/aruba/misc.py +0 -0
  107. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/b4com/__init__.py +0 -0
  108. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/b4com/file.py +0 -0
  109. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/cisco/__init__.py +0 -0
  110. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/cisco/iface.py +0 -0
  111. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/cisco/misc.py +0 -0
  112. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/cisco/vlandb.py +0 -0
  113. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/common.py +0 -0
  114. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/deploying.py +0 -0
  115. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/huawei/__init__.py +0 -0
  116. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/huawei/aaa.py +0 -0
  117. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/huawei/bgp.py +0 -0
  118. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/huawei/iface.py +0 -0
  119. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/huawei/misc.py +0 -0
  120. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/huawei/vlandb.py +0 -0
  121. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/juniper/__init__.py +0 -0
  122. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/nexus/__init__.py +0 -0
  123. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/nexus/iface.py +0 -0
  124. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/patching.py +0 -0
  125. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/ribbon/__init__.py +0 -0
  126. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/routeros/__init__.py +0 -0
  127. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/routeros/file.py +0 -0
  128. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/arista.deploy +0 -0
  129. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/arista.order +0 -0
  130. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/arista.rul +0 -0
  131. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/aruba.deploy +0 -0
  132. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/aruba.order +0 -0
  133. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/aruba.rul +0 -0
  134. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/b4com.deploy +0 -0
  135. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/b4com.order +0 -0
  136. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/b4com.rul +0 -0
  137. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/cisco.deploy +0 -0
  138. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/cisco.order +0 -0
  139. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/cisco.rul +0 -0
  140. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/huawei.deploy +0 -0
  141. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/huawei.order +0 -0
  142. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/huawei.rul +0 -0
  143. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/juniper.rul +0 -0
  144. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/nexus.deploy +0 -0
  145. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/nexus.order +0 -0
  146. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/nexus.rul +0 -0
  147. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/nokia.rul +0 -0
  148. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/optixtrans.deploy +0 -0
  149. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/optixtrans.order +0 -0
  150. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/optixtrans.rul +0 -0
  151. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/pc.deploy +0 -0
  152. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/pc.order +0 -0
  153. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/pc.rul +0 -0
  154. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/ribbon.deploy +0 -0
  155. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/ribbon.rul +0 -0
  156. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/routeros.order +0 -0
  157. {annet-0.16.24 → annet-0.16.26}/annet/rulebook/texts/routeros.rul +0 -0
  158. {annet-0.16.24 → annet-0.16.26}/annet/storage.py +0 -0
  159. {annet-0.16.24 → annet-0.16.26}/annet/tabparser.py +0 -0
  160. {annet-0.16.24 → annet-0.16.26}/annet/text_term_format.py +0 -0
  161. {annet-0.16.24 → annet-0.16.26}/annet/tracing.py +0 -0
  162. {annet-0.16.24 → annet-0.16.26}/annet/types.py +0 -0
  163. {annet-0.16.24 → annet-0.16.26}/annet.egg-info/SOURCES.txt +0 -0
  164. {annet-0.16.24 → annet-0.16.26}/annet.egg-info/dependency_links.txt +0 -0
  165. {annet-0.16.24 → annet-0.16.26}/annet.egg-info/entry_points.txt +0 -0
  166. {annet-0.16.24 → annet-0.16.26}/annet.egg-info/requires.txt +0 -0
  167. {annet-0.16.24 → annet-0.16.26}/annet.egg-info/top_level.txt +0 -0
  168. {annet-0.16.24 → annet-0.16.26}/annet_generators/__init__.py +0 -0
  169. {annet-0.16.24 → annet-0.16.26}/annet_generators/example/__init__.py +0 -0
  170. {annet-0.16.24 → annet-0.16.26}/annet_generators/example/lldp.py +0 -0
  171. {annet-0.16.24 → annet-0.16.26}/annet_generators/mesh_example/__init__.py +0 -0
  172. {annet-0.16.24 → annet-0.16.26}/annet_generators/mesh_example/bgp.py +0 -0
  173. {annet-0.16.24 → annet-0.16.26}/annet_generators/mesh_example/mesh_logic.py +0 -0
  174. {annet-0.16.24 → annet-0.16.26}/annet_generators/rpl_example/__init__.py +0 -0
  175. {annet-0.16.24 → annet-0.16.26}/annet_generators/rpl_example/items.py +0 -0
  176. {annet-0.16.24 → annet-0.16.26}/annet_generators/rpl_example/policy_generator.py +0 -0
  177. {annet-0.16.24 → annet-0.16.26}/annet_generators/rpl_example/route_policy.py +0 -0
  178. {annet-0.16.24 → annet-0.16.26}/requirements.txt +0 -0
  179. {annet-0.16.24 → annet-0.16.26}/setup.cfg +0 -0
  180. {annet-0.16.24 → annet-0.16.26}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: annet
3
- Version: 0.16.24
3
+ Version: 0.16.26
4
4
  Summary: annet
5
5
  Home-page: https://github.com/annetutil/annet
6
6
  License: MIT
@@ -4,6 +4,7 @@ import copy
4
4
  import fnmatch
5
5
  import json
6
6
  from collections.abc import Mapping, Sequence
7
+ from operator import itemgetter
7
8
  from typing import Any, Dict, List, Optional
8
9
 
9
10
  import jsonpatch
@@ -73,7 +74,7 @@ def _ensure_pointer_exists(doc: Dict[str, Any], pointer: jsonpointer.JsonPointer
73
74
 
74
75
  def make_patch(old: Dict[str, Any], new: Dict[str, Any]) -> List[Dict[str, Any]]:
75
76
  """Generate a JSON patch by comparing the old document with the new one."""
76
- return jsonpatch.make_patch(old, new).patch
77
+ return sorted(jsonpatch.make_patch(old, new).patch, key=itemgetter("path"))
77
78
 
78
79
 
79
80
  def apply_patch(content: Optional[bytes], patch_bytes: bytes) -> bytes:
@@ -54,11 +54,30 @@ class PatchItem:
54
54
  row: str
55
55
  child: "Union[PatchTree, None]"
56
56
  context: Dict[str, str]
57
+ sort_key: Tuple[Any, ...]
57
58
 
58
- def __init__(self, row, child, context):
59
+ def __init__(self, row, child, context, sort_key):
59
60
  self.row = row
60
61
  self.child = child
61
62
  self.context = context
63
+ self.sort_key = sort_key
64
+
65
+ def to_json(self) -> dict[str, Any]:
66
+ return {
67
+ "row": self.row,
68
+ "child": self.child.to_json() if self.child is not None else None,
69
+ "context": self.context,
70
+ "sort_key": self.sort_key,
71
+ }
72
+
73
+ @classmethod
74
+ def from_json(cls, data: dict[str, Any]) -> "PatchItem":
75
+ return cls(
76
+ row=data["row"],
77
+ child=PatchTree.from_json(data["child"]) if data["child"] is not None else None,
78
+ context=data["context"],
79
+ sort_key=data["sort_key"],
80
+ )
62
81
 
63
82
  def __str__(self):
64
83
  return (
@@ -66,6 +85,7 @@ class PatchItem:
66
85
  f' row="{self.row}",\n'
67
86
  f" child={textwrap.indent(str(self.child), ' ').strip()},\n"
68
87
  f" context={self.context}\n"
88
+ f" sort_key={self.sort_key}\n"
69
89
  f")"
70
90
  )
71
91
 
@@ -78,15 +98,15 @@ class PatchTree:
78
98
  if row:
79
99
  self.add(row, {})
80
100
 
81
- def add(self, row: str, context: Dict[str, str]) -> None:
82
- self.itms.append(PatchItem(row, None, context))
101
+ def add(self, row: str, context: Dict[str, str], sort_key=()) -> None:
102
+ self.itms.append(PatchItem(row, None, context, sort_key))
83
103
 
84
- def add_block(self, row: str, subtree: "Optional[PatchTree]" = None, context: Dict[str, str] = None) -> "PatchTree":
104
+ def add_block(self, row: str, subtree: "Optional[PatchTree]" = None, context: Dict[str, str] = None, sort_key=()) -> "PatchTree":
85
105
  if subtree is None:
86
106
  subtree = PatchTree()
87
107
  if context is None:
88
108
  context = {}
89
- self.itms.append(PatchItem(row, subtree, context))
109
+ self.itms.append(PatchItem(row, subtree, context, sort_key))
90
110
  return subtree
91
111
 
92
112
  def items(self) -> "Iterator[Tuple[str, Union[PatchTree, None]]]":
@@ -106,6 +126,21 @@ class PatchTree:
106
126
  ret[str(row)] = None
107
127
  return ret
108
128
 
129
+ def to_json(self) -> list[dict[str, Any]]:
130
+ return [i.to_json() for i in self.itms]
131
+
132
+ @classmethod
133
+ def from_json(cls, data: list[dict[str, Any]]) -> "PatchTree":
134
+ ret = cls()
135
+ ret.itms = [PatchItem.from_json(i) for i in data]
136
+ return ret
137
+
138
+ def sort(self) -> None:
139
+ self.itms.sort(key=operator.attrgetter("sort_key"))
140
+ for item in self.itms:
141
+ if item.child:
142
+ item.child.sort()
143
+
109
144
  def __bool__(self):
110
145
  return bool(self.itms)
111
146
 
@@ -409,18 +444,19 @@ def make_patch(pre, rb, hw, add_comments, orderer=None, _root_pre=None, do_commi
409
444
  "context": attrs["context"],
410
445
  })
411
446
  tree = PatchTree()
412
- sorted_patch = sorted(patch, key=(lambda item: (
413
- (item["order"] if item["order_direct"] else -item["order"]),
414
- item["raw_rule"],
415
- item["order_direct"],
416
- )))
417
- for item in sorted_patch:
447
+ for item in patch:
448
+ sort_key = (
449
+ (item["order"] if item["order_direct"] else -item["order"]),
450
+ item["raw_rule"],
451
+ item["order_direct"],
452
+ )
418
453
  if (not item["children"] and not item["parent"]) or not item["direct"]:
419
- tree.add(item["row"], item["context"])
454
+ tree.add(item["row"], item["context"], sort_key)
420
455
  else:
421
- tree.add_block(item["row"], item["children"], item["context"])
456
+ tree.add_block(item["row"], item["children"], item["context"], sort_key)
422
457
  if item["force_commit"]:
423
- tree.add("commit", item["context"])
458
+ tree.add("commit", item["context"], sort_key)
459
+ tree.sort()
424
460
  return tree
425
461
 
426
462
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: annet
3
- Version: 0.16.24
3
+ Version: 0.16.26
4
4
  Summary: annet
5
5
  Home-page: https://github.com/annetutil/annet
6
6
  License: MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes