Skip to content

Commit

Permalink
upgrade-prettytable, use colored table
Browse files Browse the repository at this point in the history
  • Loading branch information
0xalpharush committed Mar 17, 2023
1 parent 096769b commit 3cdb23c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
python_requires=">=3.8",
install_requires=[
"packaging",
"prettytable>=0.7.2",
"prettytable>=3.3.0",
"pycryptodome>=3.4.6",
# "crytic-compile>=0.3.0",
"crytic-compile@git+https://github.com/crytic/crytic-compile.git@master#egg=crytic-compile",
Expand Down
6 changes: 3 additions & 3 deletions slither/utils/myprettytable.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import List, Dict

from prettytable import PrettyTable
from prettytable.colortable import ColorTable, Themes


class MyPrettyTable:
Expand All @@ -11,8 +11,8 @@ def __init__(self, field_names: List[str]):
def add_row(self, row: List[str]) -> None:
self._rows.append(row)

def to_pretty_table(self) -> PrettyTable:
table = PrettyTable(self._field_names)
def to_pretty_table(self) -> ColorTable:
table = ColorTable(self._field_names, theme=Themes.OCEAN)
for row in self._rows:
table.add_row(row)
return table
Expand Down

0 comments on commit 3cdb23c

Please sign in to comment.