Skip to content

Commit 5f9f8e4

Browse files
committed
Replace deprecated constants with enums
1 parent 042a3ab commit 5f9f8e4

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ dynamic = [ "version" ]
3737
dependencies = [
3838
"httpx>=0.19",
3939
"platformdirs",
40-
"prettytable>=2.4",
40+
"prettytable>=3.12",
4141
"pytablewriter[html]>=0.63",
4242
"python-dateutil",
4343
"python-slugify",

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
freezegun==1.5.1
33
httpx==0.27.2
44
platformdirs==4.3.6
5-
prettytable==3.11.0
5+
prettytable==3.12.0
66
pytablewriter[html]==1.2.0
77
pytest==8.3.3
88
pytest-cov==5.0.0

src/norwegianblue/__init__.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,12 @@ def _prettytable(
227227
color: str = "yes",
228228
title: str | None = None,
229229
) -> str:
230-
from prettytable import MARKDOWN, SINGLE_BORDER, PrettyTable
230+
from prettytable import PrettyTable, TableStyle
231231

232232
x = PrettyTable()
233-
x.set_style(MARKDOWN if format_ == "markdown" else SINGLE_BORDER)
233+
x.set_style(
234+
TableStyle.MARKDOWN if format_ == "markdown" else TableStyle.SINGLE_BORDER
235+
)
234236
do_color = color != "no" and format_ == "pretty"
235237

236238
for header in headers:

0 commit comments

Comments
 (0)