Skip to content

Commit d6cc0d2

Browse files
committed
Rename 'x' variable to 'table'
1 parent 5f9f8e4 commit d6cc0d2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/norwegianblue/__init__.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ def _prettytable(
229229
) -> str:
230230
from prettytable import PrettyTable, TableStyle
231231

232-
x = PrettyTable()
233-
x.set_style(
232+
table = PrettyTable()
233+
table.set_style(
234234
TableStyle.MARKDOWN if format_ == "markdown" else TableStyle.SINGLE_BORDER
235235
)
236236
do_color = color != "no" and format_ == "pretty"
@@ -239,19 +239,19 @@ def _prettytable(
239239
left_align = header in ("cycle", "latest", "link")
240240
display_header = colored(header, attrs=["bold"]) if do_color else header
241241
col_data = [row[header] if header in row else "" for row in data]
242-
x.add_column(display_header, col_data)
242+
table.add_column(display_header, col_data)
243243

244244
if left_align:
245-
x.align[display_header] = "l"
245+
table.align[display_header] = "l"
246246

247247
title_prefix = ""
248248
if title:
249249
if format_ == "pretty":
250-
x.title = colored(title, attrs=["bold"]) if do_color else title
250+
table.title = colored(title, attrs=["bold"]) if do_color else title
251251
else:
252252
title_prefix = f"## {title}\n\n"
253253

254-
return title_prefix + x.get_string()
254+
return title_prefix + table.get_string()
255255

256256

257257
def _pytablewriter(

0 commit comments

Comments
 (0)