python-table-processor 0.3.7__tar.gz → 0.3.8__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 (23) hide show
  1. {python_table_processor-0.3.7 → python_table_processor-0.3.8}/PKG-INFO +1 -1
  2. {python_table_processor-0.3.7 → python_table_processor-0.3.8}/pyproject.toml +1 -1
  3. python_table_processor-0.3.8/table_processor/__init__.py +2 -0
  4. {python_table_processor-0.3.7 → python_table_processor-0.3.8}/table_processor/core/actions.py +5 -5
  5. python_table_processor-0.3.7/table_processor/__init__.py +0 -2
  6. {python_table_processor-0.3.7 → python_table_processor-0.3.8}/LICENSE +0 -0
  7. {python_table_processor-0.3.7 → python_table_processor-0.3.8}/README.md +0 -0
  8. {python_table_processor-0.3.7 → python_table_processor-0.3.8}/table_processor/cli.py +0 -0
  9. {python_table_processor-0.3.7 → python_table_processor-0.3.8}/table_processor/commands/convert_tables.py +0 -0
  10. {python_table_processor-0.3.7 → python_table_processor-0.3.8}/table_processor/commands/merge_tables.py +0 -0
  11. {python_table_processor-0.3.7 → python_table_processor-0.3.8}/table_processor/core/config.py +0 -0
  12. {python_table_processor-0.3.7 → python_table_processor-0.3.8}/table_processor/core/constants.py +0 -0
  13. {python_table_processor-0.3.7 → python_table_processor-0.3.8}/table_processor/core/convert.py +0 -0
  14. {python_table_processor-0.3.7 → python_table_processor-0.3.8}/table_processor/core/functions/assign_id.py +0 -0
  15. {python_table_processor-0.3.7 → python_table_processor-0.3.8}/table_processor/core/functions/flatten_row.py +0 -0
  16. {python_table_processor-0.3.7 → python_table_processor-0.3.8}/table_processor/core/functions/get_nested_field_value.py +0 -0
  17. {python_table_processor-0.3.7 → python_table_processor-0.3.8}/table_processor/core/functions/nest_row.py +0 -0
  18. {python_table_processor-0.3.7 → python_table_processor-0.3.8}/table_processor/core/functions/search_column_value.py +0 -0
  19. {python_table_processor-0.3.7 → python_table_processor-0.3.8}/table_processor/core/functions/set_flat_field_value.py +0 -0
  20. {python_table_processor-0.3.7 → python_table_processor-0.3.8}/table_processor/core/functions/set_nested_field_value.py +0 -0
  21. {python_table_processor-0.3.7 → python_table_processor-0.3.8}/table_processor/core/functions/set_row_value.py +0 -0
  22. {python_table_processor-0.3.7 → python_table_processor-0.3.8}/table_processor/core/merge.py +0 -0
  23. {python_table_processor-0.3.7 → python_table_processor-0.3.8}/table_processor/core/types.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-table-processor
3
- Version: 0.3.7
3
+ Version: 0.3.8
4
4
  Summary: A table data processor
5
5
  Home-page: https://github.com/akivajp/python-table-processor
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "python-table-processor"
3
- version = "0.3.7"
3
+ version = "0.3.8"
4
4
  description = "A table data processor"
5
5
  authors = ["Akiva Miura <akiva.miura@gmail.com>"]
6
6
  license = "MIT"
@@ -0,0 +1,2 @@
1
+ __version__ = "0.3.8"
2
+ __version_tuple__ = (0, 3, 8)
@@ -486,9 +486,9 @@ def search_with_operator(
486
486
  row: Row,
487
487
  source: str,
488
488
  ):
489
- or_operator = '\|\|'
490
- null_or_operator = '\?\?'
491
- operator_group = f'{or_operator}|{null_or_operator}'
489
+ or_operator = '||'
490
+ null_or_operator = '??'
491
+ operator_group = f'{re.escape(or_operator)}|{re.escape(null_or_operator)}'
492
492
  matched = re.split(f'({operator_group})', source, 1)
493
493
  #ic(source, matched)
494
494
  if len(matched) == 1:
@@ -496,10 +496,10 @@ def search_with_operator(
496
496
  matched = map(str.strip, matched)
497
497
  left, operator, rest = matched
498
498
  value, found = search_column_value(row.nested, left)
499
- if operator == '||':
499
+ if operator == or_operator:
500
500
  if bool(value):
501
501
  return value, found
502
- if operator == '??':
502
+ if operator == null_or_operator:
503
503
  if found and value is not None:
504
504
  return value, found
505
505
  return search_with_operator(row, rest)
@@ -1,2 +0,0 @@
1
- __version__ = "0.3.7"
2
- __version_tuple__ = (0, 3, 7)