Skip to content

Commit

Permalink
v2.2.8 added
Browse files Browse the repository at this point in the history
  • Loading branch information
impratikjaiswal committed Jul 4, 2023
1 parent 11e9588 commit b6c38d2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python_helpers/ph_constants_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class PhConfigConst:
TOOL_VERSION = '2.2.7'
TOOL_VERSION = '2.2.8'
TOOL_VERSION_DETAILED = f'v{TOOL_VERSION}'
TOOL_NAME = 'pythonHelpers'
4 changes: 4 additions & 0 deletions python_helpers/ph_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1523,6 +1523,10 @@ def extend_list(cls, obj, expected_length=0, filler='', unique_entries=False, tr

@classmethod
def combine_list_items(cls, list_data, trim_data=True, clean_data=True):
if not isinstance(list_data, list):
temp = list_data
list_data = list()
list_data.append(temp)
list_data = list(filter(None, list_data))
if trim_data:
list_data = [x.strip() if x is not None else x for x in list_data]
Expand Down
9 changes: 5 additions & 4 deletions test/log/pycharm.log
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ User Name is Pratik Jaiswal
--------------------------------------------------------------------------------
User Account is impra
--------------------------------------------------------------------------------
Time Stamp is Monday, Jul 03 2023, 20:16:17:634165, IST (GMT+0530)
Time Stamp is Tuesday, Jul 04 2023, 21:09:27:687837, IST (GMT+0530)
--------------------------------------------------------------------------------
pythonHelpers version is v2.2.6
pythonHelpers version is v2.2.8
--------------------------------------------------------------------------------
Test Tool version is v1.0.1
--------------------------------------------------------------------------------
Expand All @@ -24,9 +24,9 @@ User Name is Pratik Jaiswal
--------------------------------------------------------------------------------
User Account is impra
--------------------------------------------------------------------------------
Time Stamp is Monday, Jul 03 2023, 20:16:17:634165, IST (GMT+0530)
Time Stamp is Tuesday, Jul 04 2023, 21:09:27:687837, IST (GMT+0530)
--------------------------------------------------------------------------------
pythonHelpers version is v2.2.6
pythonHelpers version is v2.2.8
--------------------------------------------------------------------------------
Python version is v3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)]
----------------------------------------------------------- -----------------------------------------------------------
Expand Down Expand Up @@ -71,6 +71,7 @@ False
-------------------------------------------------- combine_list_items --------------------------------------------------
Pj; Lp; nn
Pj; Lp; nn
Pj
----------------------------------------- combine_list_items ; clean_data=False ----------------------------------------
;Pj; Lp; nn
Pj;; Lp; nn
Expand Down
1 change: 1 addition & 0 deletions test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def test_list():
PhUtil.print_heading(str_heading='combine_list_items')
print(PhUtil.combine_list_items(['Pj', 'Lp', ' nn'], trim_data=True))
print(PhUtil.combine_list_items(['Pj', 'Lp', ' nn'], trim_data=False))
print(PhUtil.combine_list_items('Pj'))
PhUtil.print_heading(str_heading='combine_list_items ; clean_data=False')
print(PhUtil.combine_list_items([';Pj ', 'Lp', 'nn'], clean_data=False))
print(PhUtil.combine_list_items(['Pj; ', 'Lp', 'nn'], clean_data=False))
Expand Down

0 comments on commit b6c38d2

Please sign in to comment.