We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a25937f commit e16da3dCopy full SHA for e16da3d
src/spdx_tools/spdx/validation/uri_validators.py
@@ -18,6 +18,7 @@
18
download_location_pattern = (
19
"^(((" + supported_download_repos + "\\+)?" + url_pattern + ")|" + git_pattern + "|" + bazaar_pattern + ")$"
20
)
21
+compiled_pattern = re.compile(download_location_pattern, re.IGNORECASE)
22
23
24
def validate_url(url: str) -> List[str]:
@@ -28,7 +29,7 @@ def validate_url(url: str) -> List[str]:
28
29
30
31
def validate_download_location(location: str) -> List[str]:
- if not (validate_url(location) == [] or re.match(download_location_pattern, location)):
32
+ if not (validate_url(location) == [] or compiled_pattern.match(location)):
33
return [f"must be a valid URL or download location according to the specification, but is: {location}"]
34
35
return []
0 commit comments