Skip to content

Commit 1667b70

Browse files
yt-msMidnighter
authored andcommitted
refactor(Workspace): PR feedback
1 parent d18d167 commit 1667b70

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/structurizr/workspace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def dump(
231231
kwargs: other arguments to pass through to `json.dumps()`.
232232
"""
233233
filename = Path(filename)
234-
with gzip.open(filename, "wt") if zip else open(filename, "wt") as handle:
234+
with gzip.open(filename, "wt") if zip else filename.open("wt") as handle:
235235
handle.write(self.dumps(indent=indent, **kwargs))
236236

237237
def dumps(self, indent: Optional[int] = None, **kwargs):

tests/integration/test_workspace_io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def test_save_and_load_workspace_to_string(monkeypatch):
104104
def test_load_workspace_from_bytes(monkeypatch):
105105
"""Test loading from bytes rather than string."""
106106
path = DEFINITIONS / "GettingStarted.json"
107-
with open(path, mode='rb') as file:
107+
with open(path, mode="rb") as file:
108108
binary_content = file.read()
109109

110110
workspace = Workspace.loads(binary_content)

0 commit comments

Comments
 (0)