bare-script 3.1.1__tar.gz → 3.2.0__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.
Files changed (29) hide show
  1. {bare_script-3.1.1/src/bare_script.egg-info → bare_script-3.2.0}/PKG-INFO +3 -2
  2. {bare_script-3.1.1 → bare_script-3.2.0}/setup.cfg +1 -1
  3. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script/value.py +13 -0
  4. {bare_script-3.1.1 → bare_script-3.2.0/src/bare_script.egg-info}/PKG-INFO +3 -2
  5. {bare_script-3.1.1 → bare_script-3.2.0}/LICENSE +0 -0
  6. {bare_script-3.1.1 → bare_script-3.2.0}/README.md +0 -0
  7. {bare_script-3.1.1 → bare_script-3.2.0}/pyproject.toml +0 -0
  8. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script/__init__.py +0 -0
  9. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script/__main__.py +0 -0
  10. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script/bare.py +0 -0
  11. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script/baredoc.py +0 -0
  12. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script/data.py +0 -0
  13. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script/include/__init__.py +0 -0
  14. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script/include/args.mds +0 -0
  15. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script/include/forms.mds +0 -0
  16. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script/include/markdownUp.bare +0 -0
  17. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script/include/pager.mds +0 -0
  18. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script/include/unittest.mds +0 -0
  19. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script/include/unittestMock.mds +0 -0
  20. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script/library.py +0 -0
  21. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script/model.py +0 -0
  22. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script/options.py +0 -0
  23. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script/parser.py +0 -0
  24. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script/runtime.py +0 -0
  25. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script.egg-info/SOURCES.txt +0 -0
  26. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script.egg-info/dependency_links.txt +0 -0
  27. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script.egg-info/entry_points.txt +0 -0
  28. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script.egg-info/requires.txt +0 -0
  29. {bare_script-3.1.1 → bare_script-3.2.0}/src/bare_script.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: bare-script
3
- Version: 3.1.1
3
+ Version: 3.2.0
4
4
  Summary: bare-script
5
5
  Home-page: https://github.com/craigahobbs/bare-script
6
6
  Author: Craig A. Hobbs
@@ -21,6 +21,7 @@ Classifier: Topic :: Utilities
21
21
  Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
23
  Requires-Dist: schema-markdown>=1.2.0
24
+ Dynamic: license-file
24
25
 
25
26
  # bare-script
26
27
 
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = bare-script
3
- version = 3.1.1
3
+ version = 3.2.0
4
4
  url = https://github.com/craigahobbs/bare-script
5
5
  author = Craig A. Hobbs
6
6
  author_email = craigahobbs@gmail.com
@@ -123,6 +123,8 @@ class _JSONEncoder(json.JSONEncoder):
123
123
  def default(self, o):
124
124
  if isinstance(o, datetime.date):
125
125
  return value_string(o)
126
+ elif callable(o):
127
+ return value_string(o)
126
128
  return None
127
129
 
128
130
 
@@ -206,6 +208,17 @@ def value_compare(left, right):
206
208
  if item_compare != 0:
207
209
  return item_compare
208
210
  return -1 if len(left) < len(right) else (0 if len(left) == len(right) else 1)
211
+ elif isinstance(left, dict) and isinstance(right, dict):
212
+ left_key_values = sorted(left.items())
213
+ right_key_values = sorted(right.items())
214
+ for ix in range(min(len(left_key_values), len(right_key_values))):
215
+ key_compare = value_compare(left_key_values[ix][0], right_key_values[ix][0])
216
+ if key_compare != 0:
217
+ return key_compare
218
+ val_compare = value_compare(left_key_values[ix][1], right_key_values[ix][1])
219
+ if val_compare != 0:
220
+ return val_compare
221
+ return -1 if len(left_key_values) < len(right_key_values) else (0 if len(left_key_values) == len(right_key_values) else 1)
209
222
 
210
223
  # Invalid comparison - compare by type name
211
224
  type1 = value_type(left) or 'unknown'
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: bare-script
3
- Version: 3.1.1
3
+ Version: 3.2.0
4
4
  Summary: bare-script
5
5
  Home-page: https://github.com/craigahobbs/bare-script
6
6
  Author: Craig A. Hobbs
@@ -21,6 +21,7 @@ Classifier: Topic :: Utilities
21
21
  Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
23
  Requires-Dist: schema-markdown>=1.2.0
24
+ Dynamic: license-file
24
25
 
25
26
  # bare-script
26
27
 
File without changes
File without changes
File without changes