Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions yfinance/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,36 @@ def generate_list_table_from_dict(data: dict, bullets: bool=True, title: str=Non
def generate_list_table_from_dict_universal(data: dict, bullets: bool=True, title: str=None, concat_keys=[]) -> str:
"""
Generate a list-table for the docstring showing permitted keys/values.

Parameters
----------
data : dict
Dictionary containing keys and their possible values.
bullets : bool, optional
If True, formats values as bullet points. Default is True.
title : str, optional
Title for the table. Default is None.
concat_keys : list, optional
Keys for which short lines should be concatenated. Default is [].

Returns
-------
str
A formatted string representing the list-table for documentation.

Example
-------
>>> data = {'color': ['red', 'blue'], 'size': ['S', 'M', 'L']}
>>> print(generate_list_table_from_dict_universal(data))
* - color
-
- blue
- red
- size
-
- L
- M
- S
"""
Comment on lines +1043 to 1054
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get completely different output. How exactly did you run this code?

table = _generate_table_configurations(title)
for k in data.keys():
Expand Down