23andMe / Yamale

A schema and validator for YAML.
MIT License
666 stars 88 forks source link

(fix)semver: SyntaxWarning: invalid escape sequence #248

Closed kiblik closed 3 months ago

kiblik commented 3 months ago

Fix SyntaxWarning:

.../yamale/validators/validators.py:260: SyntaxWarning: invalid escape sequence '\d'
  re.compile("^(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$"),

To reproduce this error, you need to run Python with -W error or export PYTHONWARNING=error.

Error was there for semver only but I fixed typo for mac() as well