Add flake8 to gitlib-ci - closes #58

And fix the rest of the flake8 errors.

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Nikolas Nyby authored and Sunil Mohan Adapa committed 2019-07-25 11:07:06 -07:00
1 parent f81b1751ce
commit 5439084c84
63 files changed
+105 -82

No files matched your search

+13 -11
View File
@@ -62,11 +62,12 @@ class ConfigurationForm(forms.Form):
hostname = forms.CharField(
label=ugettext_lazy('Hostname'), help_text=format_lazy(
ugettext_lazy(
'Hostname is the local name by which other devices on the local '
'network can reach your {box_name}. It must start and end with '
'an alphabet or a digit and have as interior characters only '
'alphabets, digits and hyphens. Total length must be 63 '
'characters or less.'), box_name=ugettext_lazy(cfg.box_name)),
'Hostname is the local name by which other devices on the '
'local network can reach your {box_name}. It must start and '
'end with an alphabet or a digit and have as interior '
'characters only alphabets, digits and hyphens. Total '
'length must be 63 characters or less.'),
box_name=ugettext_lazy(cfg.box_name)),
validators=[
validators.RegexValidator(HOSTNAME_REGEX,
ugettext_lazy('Invalid hostname'))
@@ -76,12 +77,13 @@ class ConfigurationForm(forms.Form):
label=ugettext_lazy('Domain Name'), help_text=format_lazy(
ugettext_lazy(
'Domain name is the global name by which other devices on the '
'Internet can reach your {box_name}. It must consist of labels '
'separated by dots. Each label must start and end with an '
'alphabet or a digit and have as interior characters only '
'alphabets, digits and hyphens. Length of each label must be 63 '
'characters or less. Total length of domain name must be 253 '
'characters or less.'), box_name=ugettext_lazy(cfg.box_name)),
'Internet can reach your {box_name}. It must consist of '
'labels separated by dots. Each label must start and end '
'with an alphabet or a digit and have as interior characters '
'only alphabets, digits and hyphens. Length of each label '
'must be 63 characters or less. Total length of domain name '
'must be 253 characters or less.'),
box_name=ugettext_lazy(cfg.box_name)),
required=False, validators=[
validators.RegexValidator(
r'^[a-zA-Z0-9]([-a-zA-Z0-9.]{,251}[a-zA-Z0-9])?$',