python-table-converter 0.2.2__tar.gz → 0.2.3__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.1
2
2
  Name: python-table-converter
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: A table data converter
5
5
  Home-page: https://github.com/akivajp/python-table-converter
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "python-table-converter"
3
- version = "0.2.2"
3
+ version = "0.2.3"
4
4
  description = "A table data converter"
5
5
  authors = ["Akiva Miura <akiva.miura@gmail.com>"]
6
6
  license = "MIT"
@@ -0,0 +1,2 @@
1
+ __version__ = "0.2.3"
2
+ __version_tuple__ = (0, 2, 3)
@@ -251,19 +251,17 @@ def convert(
251
251
  ic()
252
252
  ic(input_files)
253
253
  df_list = []
254
- dict_constants: OrderedDict | None = None
255
254
  dict_formats: OrderedDict | None = None
256
255
  dict_assign_ids= None
257
256
  root_id_stat = create_id_stat_node()
258
257
  config = setup_config(config_path)
259
258
  ic(config)
260
259
  if assign_constants:
261
- dict_constants = OrderedDict()
262
260
  fields = assign_constants.split(',')
263
261
  for field in fields:
264
262
  if '=' in field:
265
263
  dst, src = field.split('=')
266
- dict_constants[dst] = src
264
+ config.process.assign_constants[dst] = src
267
265
  else:
268
266
  raise ValueError(f'Invalid constant assignment: {field}')
269
267
  if assign_formats:
@@ -327,8 +325,8 @@ def convert(
327
325
  new_row = OrderedDict(row)
328
326
  set_field_value(new_row, '__debug__.__original__', orig)
329
327
  set_field_value(new_row, '__debug__.__file__', input_file)
330
- if dict_constants:
331
- new_row = map_constants(new_row, dict_constants)
328
+ if config.process.assign_constants:
329
+ new_row = map_constants(new_row, config.process.assign_constants)
332
330
  if config.map:
333
331
  new_row = remap_columns(new_row, config.map)
334
332
  if config.process.split_by_newline:
@@ -1,2 +0,0 @@
1
- __version__ = "0.2.2"
2
- __version_tuple__ = (0, 2, 2)