Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ilayda-cp committed Feb 5, 2025
1 parent bce6737 commit fddb3b3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
5 changes: 4 additions & 1 deletion webapp/publisher/cve/cve_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ class CveHelper:
"""

def _get_cve_file_metadata(self, file_path):
url = f"{REST_API_URL}/repos/canonical/canonicalwebteam.snap-cves/contents/{file_path}?ref=main"
url = (
f"{REST_API_URL}/repos/canonical/canonicalwebteam.snap-cves/"
f"contents/{file_path}?ref=main"
)
headers = {"Authorization": f"token {GITHUB_SNAPCRAFT_BOT_USER_TOKEN}"}
response = requests.get(url, headers=headers)

Expand Down
11 changes: 5 additions & 6 deletions webapp/publisher/cve/cve_views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import json

import flask
from canonicalwebteam.store_api.stores.snapstore import SnapPublisher

Expand Down Expand Up @@ -37,7 +35,10 @@ def get_cves(snap_name, revision):
flask.jsonify(
{
"success": False,
"error": "Data can only be sorted by id, cvss_severity, cvss_score, ubuntu_priority",
"error": (
"Data can only be sorted by id, "
"cvss_severity, cvss_score, ubuntu_priority"
),
}
),
400,
Expand Down Expand Up @@ -67,9 +68,7 @@ def get_cves(snap_name, revision):
flask.jsonify(
{
"success": False,
"error": "User is not allowed to see snap's CVE data.".format(
revision, snap_name
),
"error": "User is not allowed to see snap's CVE data.",
}
),
403,
Expand Down

0 comments on commit fddb3b3

Please sign in to comment.