python-table-processor 0.3.7__py3-none-any.whl → 0.3.8__py3-none-any.whl

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: 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,8 +1,8 @@
1
- table_processor/__init__.py,sha256=voNuwez5LsM9NyDZcQEcA5N7Cg-32xrD7xSIGlYyf6U,52
1
+ table_processor/__init__.py,sha256=2aCcYBh8v0QBhm77EG8Rb7HSYaY18N0gWeE08uXri3o,52
2
2
  table_processor/cli.py,sha256=uluf_VsBzq3Ldxh3ePGseSrv8--lI7huu-6RjDaHPPg,2170
3
3
  table_processor/commands/convert_tables.py,sha256=w4IZftSlrbt-BMPjldULT_616LSiNE3h7GmrFF7K5OM,2276
4
4
  table_processor/commands/merge_tables.py,sha256=jryGU3gUx2TlGrI6FozGS_aJQvJQFco2LKwun6Uo9KY,1719
5
- table_processor/core/actions.py,sha256=GKUKzoPxUEuWSeuY-HsqFoS5Bdm99bjkRhuBgG1s_uk,23658
5
+ table_processor/core/actions.py,sha256=BNXf9iptGl9xV2itNK4bVx1jjVHCiRgTIFlZyULe6Dc,23695
6
6
  table_processor/core/config.py,sha256=Z1s2r3y4oQXdbDCwIY_hYzoq6VRv7Sb3oUlfBCu13Lc,11646
7
7
  table_processor/core/constants.py,sha256=w-1TxtpXywb6Qh8M4YWuzcCHUvCjy5zJYxaXC3RQS6A,158
8
8
  table_processor/core/convert.py,sha256=dzGcpBwJ5omiE8Pw-VmHnGoOqDyh1Rip6BiLdvdf3V8,11561
@@ -16,8 +16,8 @@ table_processor/core/functions/set_nested_field_value.py,sha256=351AoyL8-dT9I4eB
16
16
  table_processor/core/functions/set_row_value.py,sha256=wlF_nVGZY74XCzd6pBJJyti62m6y0s1kc5Q6uq9jn8o,641
17
17
  table_processor/core/merge.py,sha256=5U6fvofaMq6yvllB24M6Pf3uG7Hz17aLKM47NmWHJBc,5027
18
18
  table_processor/core/types.py,sha256=xNvy1vL1ei87kt-MgSfRJSllYrNKRo23pHtJA15DyLQ,2895
19
- python_table_processor-0.3.7.dist-info/LICENSE,sha256=1_Gn0I1neLPxDLfLiHEyxjDg-pbAra1p2iHEqutGS_c,1068
20
- python_table_processor-0.3.7.dist-info/METADATA,sha256=GTh1Nm6ViWpYlbeO36ncPeJDe35Q8jrClH-xnhEPoRs,1098
21
- python_table_processor-0.3.7.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
22
- python_table_processor-0.3.7.dist-info/entry_points.txt,sha256=lq97F6m51yZ93qmVIqkUHJfbILZuYLxrMWXSqrP4JpM,118
23
- python_table_processor-0.3.7.dist-info/RECORD,,
19
+ python_table_processor-0.3.8.dist-info/LICENSE,sha256=1_Gn0I1neLPxDLfLiHEyxjDg-pbAra1p2iHEqutGS_c,1068
20
+ python_table_processor-0.3.8.dist-info/METADATA,sha256=JbejFTK1nVvFUQuI4XfO9ei02fdigXsBujLnQNAKges,1098
21
+ python_table_processor-0.3.8.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
22
+ python_table_processor-0.3.8.dist-info/entry_points.txt,sha256=lq97F6m51yZ93qmVIqkUHJfbILZuYLxrMWXSqrP4JpM,118
23
+ python_table_processor-0.3.8.dist-info/RECORD,,
@@ -1,2 +1,2 @@
1
- __version__ = "0.3.7"
2
- __version_tuple__ = (0, 3, 7)
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)