hprint 2.0.11__py3-none-any.whl → 2.1.0__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.
hprint/__init__.py CHANGED
@@ -81,7 +81,7 @@ def tabulate_numbered_print(data, mappings, offset=0, convert=True, missing_valu
81
81
  else:
82
82
  attrs.append(_if_null(_get(item, k), missing_value))
83
83
  tabdata.append(attrs)
84
- _print(tabulate(tabdata, headers=headers))
84
+ _print(tabulate(tabdata, headers=headers, floatfmt='', intfmt=''))
85
85
 
86
86
 
87
87
  def _len(x):
@@ -144,7 +144,7 @@ def tabulate_print(data, mappings, x=False, offset=0, header=True, raw=False, tf
144
144
  if x:
145
145
  output = x_print(tabdata, headers, offset=offset, header=header)
146
146
  else:
147
- output = tabulate(tabdata, headers=headers if header else (), tablefmt=tf)
147
+ output = tabulate(tabdata, headers=headers if header else (), tablefmt=tf, floatfmt='', intfmt='')
148
148
  if raw:
149
149
  return output
150
150
  _print(output)
hprint/utils.py CHANGED
@@ -18,4 +18,6 @@ def chain_get(data, chain, default=None):
18
18
  result = data
19
19
  for attr in attrs[:-1]:
20
20
  result = result.get(attr, {})
21
+ if result is None:
22
+ return default
21
23
  return result.get(attrs[-1], default)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hprint
3
- Version: 2.0.11
3
+ Version: 2.1.0
4
4
  Summary: Print python object in table/json format
5
5
  Home-page: https://github.com/ruanhao/hprint
6
6
  Author: Hao Ruan
@@ -0,0 +1,8 @@
1
+ hprint/__init__.py,sha256=AqKaCS5sv6NuDFbJYf5TDYKEhZGOQclGnHopD2q-GTM,5623
2
+ hprint/dsutils.py,sha256=UD1L8-23_0320w7ESc_Vwc148w_CLSyJ6t7T5t3yu9M,786
3
+ hprint/utils.py,sha256=ziZQyo-c3QhACQCnFaRjoKZTT9EhjMLu2Qf53jimhHo,603
4
+ hprint-2.1.0.dist-info/LICENSE,sha256=5IASoCg1AtQddnqyVxltUyoadbZzUpRa_0QvUB-Hwlg,1065
5
+ hprint-2.1.0.dist-info/METADATA,sha256=LU7M7DAwV3OfDsgxyaW4_Q8pcu8jsRQjalUnVuxHdaw,5298
6
+ hprint-2.1.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
7
+ hprint-2.1.0.dist-info/top_level.txt,sha256=yHUSDt5IDs8J8taLMOu-SaOZK24DyzM0TidniiEJ-Ng,7
8
+ hprint-2.1.0.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- hprint/__init__.py,sha256=fS5uJmaYPn2judG7y5ggujGoLIIXQnyjDsMBgf7uf7A,5575
2
- hprint/dsutils.py,sha256=UD1L8-23_0320w7ESc_Vwc148w_CLSyJ6t7T5t3yu9M,786
3
- hprint/utils.py,sha256=xKqAi2Ks6zOoD4Jl_eioVcD1G33GNtFIOpmaeAYD0C4,549
4
- hprint-2.0.11.dist-info/LICENSE,sha256=5IASoCg1AtQddnqyVxltUyoadbZzUpRa_0QvUB-Hwlg,1065
5
- hprint-2.0.11.dist-info/METADATA,sha256=7rmcs_FVRFTafvKQlqlVXdXqqOf_As_E609S99IWKTM,5299
6
- hprint-2.0.11.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
7
- hprint-2.0.11.dist-info/top_level.txt,sha256=yHUSDt5IDs8J8taLMOu-SaOZK24DyzM0TidniiEJ-Ng,7
8
- hprint-2.0.11.dist-info/RECORD,,