Skip to content

Commit fcfa337

Browse files
committed
[chores] Minor formatting fixes
1 parent 6754ac9 commit fcfa337

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

openwisp_controller/config/base/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class AbstractConfig(BaseConfig):
3939
verbose_name=_('templates'),
4040
base_class=TemplatesThrough,
4141
blank=True,
42-
help_text=_('configuration templates, applied from ' 'first to last'),
42+
help_text=_('configuration templates, applied from first to last'),
4343
)
4444
vpn = models.ManyToManyField(
4545
get_model_name('config', 'Vpn'),

openwisp_controller/config/base/device.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class AbstractDevice(OrgMixin, BaseModel):
7272
blank=True,
7373
null=True,
7474
db_index=True,
75-
help_text=_('ip address of the management interface, ' 'if available'),
75+
help_text=_('ip address of the management interface, if available'),
7676
)
7777
hardware_id = models.CharField(**(app_settings.HARDWARE_ID_OPTIONS))
7878

openwisp_controller/config/base/multitenancy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class AbstractOrganizationConfigSettings(UUIDModel):
1515
registration_enabled = models.BooleanField(
1616
_('auto-registration enabled'),
1717
default=True,
18-
help_text=_('Whether automatic registration of ' 'devices is enabled or not'),
18+
help_text=_('Whether automatic registration of devices is enabled or not'),
1919
)
2020
shared_secret = KeyField(
2121
max_length=32,

openwisp_controller/config/base/template.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ class AbstractTemplate(ShareableOrgMixin, BaseConfig):
5858
choices=TYPE_CHOICES,
5959
default='generic',
6060
db_index=True,
61-
help_text=_('template type, determines which ' 'features are available'),
61+
help_text=_('template type, determines which features are available'),
6262
)
6363
default = models.BooleanField(
6464
_('enabled by default'),
6565
default=False,
6666
db_index=True,
6767
help_text=_(
68-
'whether new configurations will have ' 'this template enabled by default'
68+
'whether new configurations will have this template enabled by default'
6969
),
7070
)
7171
auto_cert = models.BooleanField(

openwisp_controller/config/controller/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ def post(self, request, *args, **kwargs):
176176
# ("running" was changed to "applied")
177177
status = status if status != 'running' else 'applied'
178178
# call set_status_{status} method on Config model
179-
method_name = 'set_status_{}'.format(status)
179+
method_name = f'set_status_{status}'
180180
getattr(config, method_name)()
181181
return ControllerResponse(
182-
'report-result: success\n' 'current-status: {}\n'.format(config.status),
182+
f'report-result: success\ncurrent-status: {config.status}\n',
183183
content_type='text/plain',
184184
)
185185

openwisp_controller/config/tests/test_vpn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def test_vpn_cert_and_ca_mismatch(self):
149149
except ValidationError as e:
150150
self.assertIn('cert', e.message_dict)
151151
else:
152-
self.fail('Mismatch between ca and cert but ' 'ValidationError not raised')
152+
self.fail('Mismatch between ca and cert but ValidationError not raised')
153153

154154
def test_auto_client(self):
155155
vpn = self._create_vpn()

0 commit comments

Comments
 (0)