mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
f-strings and lint fixes
This commit is contained in:
@@ -914,8 +914,8 @@ class AzureProvider(BaseProvider):
|
||||
for value in pool.data['values']:
|
||||
if value['up']:
|
||||
# Azure only supports up=None & up=False, not up=True
|
||||
msg = 'up=True is not supported for "{}" pool in {}' \
|
||||
.format(name, record.fqdn)
|
||||
msg = f'up=True is not supported for "{name}" pool ' \
|
||||
f'in {record.fqdn}'
|
||||
fallback = 'ignoring it'
|
||||
self.supports_warn_or_except(msg, fallback)
|
||||
|
||||
@@ -1064,7 +1064,7 @@ class AzureProvider(BaseProvider):
|
||||
# mark default
|
||||
ep_name += '--default--'
|
||||
default_seen = True
|
||||
ep_status = 'Disabled' if val['up'] == False else \
|
||||
ep_status = 'Disabled' if val['up'] is False else \
|
||||
'Enabled'
|
||||
endpoints.append(Endpoint(
|
||||
name=ep_name,
|
||||
|
||||
@@ -1284,11 +1284,12 @@ class Ns1Provider(BaseProvider):
|
||||
if up is None:
|
||||
# state is not forced, let's find a monitor
|
||||
feed_id = value_feed.get(value)
|
||||
# check for identical monitor and skip creating one if found
|
||||
# check for identical monitor and skip creating one if
|
||||
# found
|
||||
if not feed_id:
|
||||
existing = existing_monitors.get(value)
|
||||
monitor_id, feed_id = self._monitor_sync(record, value,
|
||||
existing)
|
||||
existing)
|
||||
value_feed[value] = feed_id
|
||||
active_monitors.add(monitor_id)
|
||||
|
||||
|
||||
@@ -945,8 +945,8 @@ class Route53Provider(BaseProvider):
|
||||
for name, pool in dynamic.pools.items():
|
||||
for value in pool.data['values']:
|
||||
if value['up'] is not None:
|
||||
msg = '"up" flag is not supported for "{}" pool' \
|
||||
' in {}'.format(name, record.fqdn)
|
||||
msg = f'"up" flag is not supported for "{name}"' \
|
||||
f' pool in {record.fqdn}'
|
||||
fallback = 'ignoring it, octodns-sync command ' \
|
||||
'will keep showing changes'
|
||||
self.supports_warn_or_except(msg, fallback)
|
||||
|
||||
Reference in New Issue
Block a user