Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(schema): simplify prefix validation regex (#280)
Annoying yak shave: - I have an ecosystem cross-reference unit test for osv.dev in the works, which relies on using the regex in the schema definition, verbatim. - [Python 3.7 has a FutureWarning on set constructs](https://docs.python.org/dev/whatsnew/3.7.html#re), where as far as I can tell, `(:[[:digit:]]+)?` would need to be written as `(:\[[:digit:]]+)?`, which isn't valid in the JSON Schema (more in python/cpython#74534) - https://json-schema.org/draft/2020-12/json-schema-core#name-regular-expressions says JSON Schema regex is ECMA-262, so what gets used in the schema needs to be the subset that works with https://docs.python.org/3/library/re.html - https://xkcd.com/1171/ --------- Signed-off-by: Andrew Pollock <[email protected]> Signed-off-by: Andrew Pollock <[email protected]>
- Loading branch information