File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/spdx_tools/spdx/validation Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 18
18
download_location_pattern = (
19
19
"^(((" + supported_download_repos + "\\ +)?" + url_pattern +
8000
")|" + git_pattern + "|" + bazaar_pattern + ")$"
20
20
)
21
+ compiled_pattern = re .compile (download_location_pattern , re .IGNORECASE )
21
22
22
23
23
24
def validate_url (url : str ) -> List [str ]:
@@ -28,7 +29,7 @@ def validate_url(url: str) -> List[str]:
28
29
29
30
30
31
def validate_download_location (location : str ) -> List [str ]:
31
- if not (validate_url (location ) == [] or re .match (download_location_pattern , location )):
32
+ if not (validate_url (location ) == [] or compiled_pattern .match (location )):
32
33
return [f"must be a valid URL or download location according to the specification, but is: { location } " ]
33
34
34
35
return []
You can’t perform that action at this time.
0 commit comments