Skip to content

Commit 1eac69d

Browse files
committed
Format with black
1 parent d2eca67 commit 1eac69d

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

elasticapm/conf/__init__.py

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,7 @@ def __call__(self, value, field_name):
307307
try:
308308
val = int(val) * self.unit_multipliers[unit]
309309
except KeyError:
310-
raise ConfigurationError(
311-
"{}={} is not a supported unit".format(field_name, unit), field_name
312-
)
310+
raise ConfigurationError("{}={} is not a supported unit".format(field_name, unit), field_name)
313311
return val
314312

315313

@@ -331,9 +329,7 @@ def __call__(self, value, field_name):
331329
try:
332330
value = float(value)
333331
except ValueError:
334-
raise ConfigurationError(
335-
"{}={} is not a float".format(field_name, value), field_name
336-
)
332+
raise ConfigurationError("{}={} is not a float".format(field_name, value), field_name)
337333
multiplier = 10**self.precision
338334
rounded = math.floor(value * multiplier + 0.5) / multiplier
339335
if rounded == 0 and self.minimum and value != 0:
@@ -358,9 +354,7 @@ def __call__(self, value, field_name):
358354
"{}={} cannot be in range: {}".format(
359355
field_name,
360356
value,
361-
self.range_desc.format(
362-
**{"range_start": self.range_start, "range_end": self.range_end}
363-
),
357+
self.range_desc.format(**{"range_start": self.range_start, "range_end": self.range_end}),
364358
),
365359
field_name,
366360
)
@@ -371,17 +365,11 @@ class FileIsReadableValidator(object):
371365
def __call__(self, value, field_name):
372366
value = os.path.normpath(value)
373367
if not os.path.exists(value):
374-
raise ConfigurationError(
375-
"{}={} does not exist".format(field_name, value), field_name
376-
)
368+
raise ConfigurationError("{}={} does not exist".format(field_name, value), field_name)
377369
elif not os.path.isfile(value):
378-
raise ConfigurationError(
379-
"{}={} is not a file".format(field_name, value), field_name
380-
)
370+
raise ConfigurationError("{}={} is not a file".format(field_name, value), field_name)
381371
elif not os.access(value, os.R_OK):
382-
raise ConfigurationError(
383-
"{}={} is not readable".format(field_name, value), field_name
384-
)
372+
raise ConfigurationError("{}={} is not readable".format(field_name, value), field_name)
385373
return value
386374

387375

0 commit comments

Comments
 (0)