Skip to content

Commit

Permalink
'Refactored by Sourcery' (#47)
Browse files Browse the repository at this point in the history
Co-authored-by: Sourcery AI <>
  • Loading branch information
sourcery-ai[bot] authored and sondrelg committed Apr 13, 2022
1 parent 9aa2599 commit f14a4c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion netsgiro/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def truthy_or_none(
``converter`` is called to further convert non-``None`` values.
"""
return lambda value: None if not value else converter(value)
return lambda value: converter(value) if value else None


def stripped_spaces_around(
Expand Down
6 changes: 1 addition & 5 deletions netsgiro/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,11 +434,7 @@ def _add_avtalegiro_transaction(
bank_notification: bool = False,
) -> 'Transaction':

if isinstance(bank_notification, str):
text = bank_notification
else:
text = ''

text = bank_notification if isinstance(bank_notification, str) else ''
number = self._next_transaction_number
self._next_transaction_number += 1

Expand Down

0 comments on commit f14a4c0

Please sign in to comment.