Parcourir la source

Constants have upper case name

Ewoud Kohl van Wijngaarden il y a 13 ans
Parent
commit
54c0c5e777
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      netfields/forms.py

+ 2 - 2
netfields/forms.py

@@ -38,7 +38,7 @@ class NetAddressFormField(forms.Field):
         return self.python_type(value)
 
 
-mac_re = re.compile(r'^(([A-F0-9]{2}:){5}[A-F0-9]{2})$')
+MAC_RE = re.compile(r'^(([A-F0-9]{2}:){5}[A-F0-9]{2})$')
 
 
 class MACAddressFormField(forms.RegexField):
@@ -47,4 +47,4 @@ class MACAddressFormField(forms.RegexField):
     }
 
     def __init__(self, *args, **kwargs):
-        super(MACAddressFormField, self).__init__(mac_re, *args, **kwargs)
+        super(MACAddressFormField, self).__init__(MAC_RE, *args, **kwargs)