Skip to content

Commit 1ffd10f

Browse files
author
Kevin Hellemun
committed
Shorten code lines. (#78)
1 parent 3beb284 commit 1ffd10f

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

tests/bunq_test.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,13 @@ def _attachment_contents(self):
130130
:rtype: bytes
131131
"""
132132

133-
with open(self._get_directory_test_root() + self._PATH_ATTACHMENT + self._ATTACHMENT_PATH_IN,
134-
self._READ_BYTES) as f:
135-
return f.read()
133+
with open(
134+
self._get_directory_test_root() +
135+
self._PATH_ATTACHMENT +
136+
self._ATTACHMENT_PATH_IN,
137+
self._READ_BYTES
138+
) as file:
139+
return file.read()
136140

137141
@property
138142
def alias_first(self):

tests/model/generated/endpoint/test_avatar.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ def attachment_contents(self):
4242
:rtype: bytes
4343
"""
4444

45-
with open(self._PATH_ATTACHMENT + self._ATTACHMENT_PATH_IN,
46-
self._READ_BYTES) as f:
47-
return f.read()
45+
with open(
46+
self._PATH_ATTACHMENT + self._ATTACHMENT_PATH_IN,
47+
self._READ_BYTES
48+
) as file:
49+
return file.read()

0 commit comments

Comments
 (0)