Skip to content

Commit 17d7afb

Browse files
committed
fix "Possible nested set" warning
`[:xdigit:]` is not a valid character class in Python regular expressions use explicit hex digit pattern
1 parent adfd8c4 commit 17d7afb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

repo2docker/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def is_valid_docker_image_name(image_name):
209209
210210
(?::([\w][\w.-]{0,127}))? # optional capture <tag-pattern>=':<tag>'
211211
# optionally capture <digest-pattern>='@<digest>'
212-
(?:@[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,})?
212+
(?:@[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][A-Fa-f0-9]{32,})?
213213
$
214214
""", re.VERBOSE)
215215

0 commit comments

Comments
 (0)