Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
bschimke95 committed Sep 23, 2024
1 parent 9914e44 commit 12400da
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/integration/tests/test_util/snap.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@

def get_snap_info(snap_name=SNAP_NAME):
"""Get the snap info from the Snap Store API."""
req = urllib.request.Request(SNAPSTORE_INFO_API + snap_name, headers=SNAPSTORE_HEADERS)
req = urllib.request.Request(
SNAPSTORE_INFO_API + snap_name, headers=SNAPSTORE_HEADERS
)
try:
with urllib.request.urlopen(req) as response: # nosec
return json.loads(response.read().decode())
Expand All @@ -49,7 +51,11 @@ def get_latest_channels(

# Extract channel information
channels = snap_info.get("channel-map", [])
available_channels = [ch["channel"]["name"] for ch in channels if ch["channel"]["architecture"] == arch]
available_channels = [
ch["channel"]["name"]
for ch in channels
if ch["channel"]["architecture"] == arch
]

# Define regex pattern to match channels in the format 'major.minor-flavour'
if flavor == "strict":
Expand Down

0 comments on commit 12400da

Please sign in to comment.