Skip to content

Commit

Permalink
Run tox -e lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sloria committed Jan 30, 2022
1 parent 6125f78 commit cbbe3ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions environs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def method(
source_key = proxied_key or parsed_key
if value is ma.missing:
if self.eager:
raise EnvError('Environment variable "{}" not set'.format(proxied_key or parsed_key))
raise EnvError(f'Environment variable "{proxied_key or parsed_key}" not set')
else:
self._errors[parsed_key].append("Environment variable not set.")
return None
Expand All @@ -124,7 +124,7 @@ def method(
except ma.ValidationError as error:
if self.eager:
raise EnvValidationError(
'Environment variable "{}" invalid: {}'.format(source_key, error.args[0]), error.messages
f'Environment variable "{source_key}" invalid: {error.args[0]}', error.messages
) from error
self._errors[parsed_key].extend(error.messages)
else:
Expand All @@ -150,7 +150,7 @@ def method(
source_key = proxied_key or parsed_key
if raw_value is ma.missing:
if self.eager:
raise EnvError('Environment variable "{}" not set'.format(proxied_key or parsed_key))
raise EnvError(f'Environment variable "{proxied_key or parsed_key}" not set')
else:
self._errors[parsed_key].append("Environment variable not set.")
return None
Expand All @@ -164,7 +164,7 @@ def method(
messages = error.messages if isinstance(error, ma.ValidationError) else [error.args[0]]
if self.eager:
raise EnvValidationError(
'Environment variable "{}" invalid: {}'.format(source_key, error.args[0]), messages
f'Environment variable "{source_key}" invalid: {error.args[0]}', messages
) from error
self._errors[parsed_key].extend(messages)
else:
Expand Down

0 comments on commit cbbe3ae

Please sign in to comment.