Skip to content

Commit fc19062

Browse files
committed
Linting: Adjustments for compatibility with verlib2 0.3
1 parent db896be commit fc19062

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

grafana_wtf/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from tqdm import tqdm
2020
from tqdm.contrib.logging import tqdm_logging_redirect
2121
from urllib3.exceptions import InsecureRequestWarning
22-
from verlib2 import Version
22+
from verlib2.packaging.version import Version
2323

2424
from grafana_wtf import __appname__, __version__
2525
from grafana_wtf.compat import CachedSession
@@ -620,7 +620,7 @@ def channels_list_by_uid(self, channel_uid):
620620
channel = self.grafana.notifications.get_channel_by_uid(channel_uid)
621621
except GrafanaClientError as ex:
622622
log.error(f"Error fetching the channel {channel_uid}: {ex}")
623-
raise SystemExit(1)
623+
raise SystemExit(1) from ex
624624

625625
# Scan dashboards and panels to find where the channel is used
626626
dashboards = self.scan_dashboards()

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"docopt-ng>=0.6.2,<0.10",
1717
"munch>=2.5.0,<5",
1818
"tqdm>=4.60.0,<5",
19-
"verlib2<0.4",
19+
"verlib2>=0.3,<0.4",
2020
# Filtering
2121
f"pandas<2.3; {no_linux_on_arm}",
2222
f"duckdb<1.3; {no_linux_on_arm}",

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import pytest
1111
from grafana_client.client import GrafanaClientError
1212
from grafanalib._gen import write_dashboard
13-
from verlib2 import version
13+
from verlib2.packaging import version
1414

1515
from grafana_wtf.core import GrafanaWtf
1616

tests/test_commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import yaml
1111
from grafana_client.elements.plugin import get_plugin_by_id
1212
from munch import munchify
13-
from verlib2 import version
13+
from verlib2.packaging import version
1414

1515
import grafana_wtf.commands
1616
from tests.conftest import mkdashboard

0 commit comments

Comments
 (0)