mirror of
https://github.com/ansible/awx.git
synced 2026-03-24 20:35:02 -02:30
Merge pull request #13081 from AlanCoding/raw_string
Use raw string to satisfy linter rules
This commit is contained in:
@@ -4934,7 +4934,7 @@ class InstanceSerializer(BaseSerializer):
|
|||||||
MaxLengthValidator(limit_value=250),
|
MaxLengthValidator(limit_value=250),
|
||||||
validators.UniqueValidator(queryset=Instance.objects.all()),
|
validators.UniqueValidator(queryset=Instance.objects.all()),
|
||||||
RegexValidator(
|
RegexValidator(
|
||||||
regex='^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$',
|
regex=r'^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$',
|
||||||
flags=re.IGNORECASE,
|
flags=re.IGNORECASE,
|
||||||
inverse_match=True,
|
inverse_match=True,
|
||||||
message="hostname cannot be localhost or 127.0.0.1",
|
message="hostname cannot be localhost or 127.0.0.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user