Skip to content

Commit

Permalink
Fix ruff. Few more exchanges
Browse files Browse the repository at this point in the history
  • Loading branch information
ValueRaider committed Jan 12, 2025
1 parent 5e9ecc6 commit 21f0247
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
11 changes: 6 additions & 5 deletions yfinance/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,13 @@ def merge_two_level_dicts(dict1, dict2):
'au': {'ASX'},
'be': {'BRU'},
'br': {'SAO'},
'ca': {'CNQ', 'TOR', 'VAN'},
'ca': {'CNQ', 'NEO', 'TOR', 'VAN'},
'ch': {'EBS'},
'cl': {'SGO'},
'cn': {'SHH', 'SHZ'},
'co': {'BVC'},
'cz': {'PRA'},
'de': {'BER', 'DUS', 'FRA', 'HAM', 'MUN', 'STU'},
'de': {'BER', 'DUS', 'FRA', 'HAM', 'GER', 'MUN', 'STU'},
'dk': {'CPH'},
'ee': {'TAL'},
'eg': {'CAI'},
Expand All @@ -360,7 +361,7 @@ def merge_two_level_dicts(dict1, dict2):
'is': {'ICE'},
'it': {'MIL'},
'jp': {'FKA', 'JPX', 'SAP'},
'kr': {'KSC'},
'kr': {'KOE', 'KSC'},
'kw': {'KUW'},
'lk': {},
'lt': {'LIT'},
Expand All @@ -371,7 +372,7 @@ def merge_two_level_dicts(dict1, dict2):
'no': {'OSL'},
'nz': {'NZE'},
'pe': {},
'ph': {},
'ph': {'PHP', 'PHS'},
'pk': {},
'pl': {'WSE'},
'pt': {'LIS'},
Expand All @@ -385,7 +386,7 @@ def merge_two_level_dicts(dict1, dict2):
'th': {'SET'},
'tr': {'IST'},
'tw': {'TAI', 'TWO'},
'us': {'ASE', 'NCM', 'NGM', 'NMS', 'NYQ', 'OEM', 'OQB', 'OQX', 'PNK', 'YHD'},
'us': {'ASE', 'BTS', 'CXI', 'NCM', 'NGM', 'NMS', 'NYQ', 'OEM', 'OQB', 'OQX', 'PCX', 'PNK', 'YHD'},
've': {'CCS'},
'vn': {},
'za': {'JNB'}
Expand Down
15 changes: 7 additions & 8 deletions yfinance/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1038,11 +1038,10 @@ def generate_list_table_from_dict_universal(data: dict, bullets: bool=True, titl
current_line += ' '*5
if i == 0:
# Only add dash to first
current_line += f"- "
current_line += "- "
else:
current_line += f" "
# current_line += '* '
# Don't draw bullet points
current_line += " "
# Don't draw bullet points:
current_line += '| '
else:
current_line += ', '
Expand All @@ -1051,17 +1050,17 @@ def generate_list_table_from_dict_universal(data: dict, bullets: bool=True, titl
table_add += ' '*5
if i == 0:
# Only add dash to first
table_add += f"- "
table_add += "- "
else:
table_add += f" "
table_add += " "

if '\n' in k2_values_str:
# Block format multiple lines
table_add += '| ' + f"{k2}:: " + "\n"
k2_values_str_lines = k2_values_str.split('\n')
for j in range(len(k2_values_str_lines)):
l = k2_values_str_lines[j]
table_add += ' '*7 + '|' + ' '*5 + l
line = k2_values_str_lines[j]
table_add += ' '*7 + '|' + ' '*5 + line
if j < len(k2_values_str_lines)-1:
table_add += "\n"
else:
Expand Down

0 comments on commit 21f0247

Please sign in to comment.