-
Notifications
You must be signed in to change notification settings - Fork 21
new file test for inline suggestion #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this needed at all? rich basically has solved this problem for us and we have it available to import
see:
from rich.console import Console
from rich.table import Table
def create_rich_table(data, headers=None, title=None):
table = Table(title=title, show_header=bool(headers))
if headers:
for header in headers:
table.add_column(str(header))
for row in data:
table.add_row(*map(str, row))
return table
if __name__ == "__main__":
data = [
["John", 30, "New York"],
["Alice", 25, "Los Angeles"],
["Bob", 35, "Chicago"],
]
headers = ["Name", "Age", "City"]
table = create_rich_table(
data,
headers=headers,
title="Sample Table",
)
console = Console()
console.print(table)
@aseembits93 I think these changes were coming from lineprof or similar. |
PR Type
Enhancement
Description
New tabulate module added for pretty-printing tables.
Supports diverse formatting options and alignments.
Implements ANSI escape handling and wide-character support.
Provides utility functions for data normalization and alignment.
Changes walkthrough 📝
tabulate.py
New table formatting module with advanced features
codeflash/code_utils/tabulate.py
tabulate
function for flexible table printing.