fix "Possible nested set" warning

`[:xdigit:]` is not a valid character class in Python regular expressions

use explicit hex digit pattern
pull/587/head
Min RK 2019-02-21 11:01:38 +01:00
rodzic adfd8c4d15
commit 17d7afb124
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -209,7 +209,7 @@ def is_valid_docker_image_name(image_name):
(?::([\w][\w.-]{0,127}))? # optional capture <tag-pattern>=':<tag>'
# optionally capture <digest-pattern>='@<digest>'
(?:@[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,})?
(?:@[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][A-Fa-f0-9]{32,})?
$
""", re.VERBOSE)