Skip to content

Commit

Permalink
fix "Possible nested set" warning
Browse files Browse the repository at this point in the history
`[:xdigit:]` is not a valid character class in Python regular expressions

use explicit hex digit pattern
  • Loading branch information
minrk committed Feb 21, 2019
1 parent adfd8c4 commit 17d7afb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion repo2docker/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 17d7afb

Please sign in to comment.