diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 56aa236..1492e83 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,23 +1,23 @@ repos: - repo: https://github.com/psf/black - rev: stable + rev: 21.12b0 hooks: - id: black - - repo: https://gitlab.com/pycqa/flake8 - rev: 3.7.8 + - repo: https://github.com/PyCQA/flake8 + rev: 4.0.1 hooks: - id: flake8 - - repo: https://github.com/pre-commit/mirrors-isort - rev: v4.3.21 + - repo: https://github.com/PyCQA/isort + rev: 5.10.1 hooks: - id: isort additional_dependencies: [toml] exclude: ^.*/?setup\.py$ - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.3.0 + rev: v4.0.1 hooks: - id: trailing-whitespace - id: end-of-file-fixer diff --git a/semver/patterns.py b/semver/patterns.py index 63cce54..0a85faf 100644 --- a/semver/patterns.py +++ b/semver/patterns.py @@ -7,8 +7,8 @@ r"([+-]?([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?" ) -_COMPLETE_VERSION = r"v?(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:\.(\d+))?{}(?:\+[^\s]+)?".format( - MODIFIERS +_COMPLETE_VERSION = ( + r"v?(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:\.(\d+))?{}(?:\+[^\s]+)?".format(MODIFIERS) ) COMPLETE_VERSION = re.compile("(?i)" + _COMPLETE_VERSION)