Skip to content

Commit 175dc25

Browse files
committed
fix: add pylint disable for long regex line
Added inline pylint disable comment for line-too-long warning on the anchor tag regex pattern in frontend_handlers.py. Signed-off-by: Vasu Khare <[email protected]>
1 parent 3ff7db2 commit 175dc25

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

gcp/website/frontend_emulator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ def _dict_to_vuln(data: object,
9090
if not vuln_id:
9191
return None
9292

93-
vulnerability = vulnerability_pb2.Vulnerability()
9493
try:
95-
json_format.ParseDict(data, vulnerability, ignore_unknown_fields=True)
94+
vulnerability = sources.parse_vulnerability_from_dict(
95+
data, strict=False)
9696
except Exception as error:
9797
print(f'[emulator] Failed to convert entry in {path}: {error}')
9898
return None

gcp/website/frontend_handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ def sort_versions(versions: list[str], ecosystem: str) -> list[str]:
835835
# <a href="https://chromium.googlesource.com/v8/v8.git/+/refs/heads/beta">
836836
_URL_MARKDOWN_REPLACER = re.compile(r'(<a href=\".*?)(/ /)(.*?\">)')
837837
_ANCHOR_TAG_REPLACER = re.compile(
838-
r'<a\s+[^>]*name=["\'][^"\']*["\'][^>]*>\s*</a>|<a\s+[^>]*name=["\'][^"\']*["\'][^>]*/>',
838+
r'<a\s+[^>]*name=["\'][^"\']*["\'][^>]*>\s*</a>|<a\s+[^>]*name=["\'][^"\']*["\'][^>]*/>', # pylint: disable=line-too-long
839839
re.IGNORECASE)
840840

841841

0 commit comments

Comments
 (0)