Skip to content

Commit f09365e

Browse files
committed
style: fix lints and format
1 parent 1943d3b commit f09365e

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

examples/fractopo_workflow_visualisation.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,5 @@ def main(output_path: Optional[Path] = None):
287287

288288

289289
if __name__ == "__main__":
290-
if len(sys.argv) > 1:
291-
output_path = Path(sys.argv[1])
292-
else:
293-
output_path = None
290+
output_path = Path(sys.argv[1]) if len(sys.argv) > 1 else None
294291
main(output_path=output_path)

marimos/utils.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,11 @@ def capture_function_outputs(
167167
exc = None
168168
results = None
169169
try:
170-
with redirect_stdout(tmp_io_stdout_and_stderr):
171-
with redirect_stderr(tmp_io_stdout_and_stderr):
172-
results = func()
170+
with (
171+
redirect_stdout(tmp_io_stdout_and_stderr),
172+
redirect_stderr(tmp_io_stdout_and_stderr),
173+
):
174+
results = func()
173175
except Exception as exception:
174176
exc = exception
175177
stderr_and_stdout = tmp_io_stdout_and_stderr.getvalue()

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,10 @@ extend-select = [ "Q", "PL", "TC", "SIM", "PTH", "I" ]
157157
# These should be gone over at some point
158158
extend-ignore = ["E402", "PLR2004", "PLR0913", "PLR0912", "S101"]
159159

160+
[tool.ruff.lint.per-file-ignores]
161+
"examples/*.py" = ["PLC0415"]
162+
"marimos/network.py" = ["PLC0415"]
163+
"marimos/validation.py" = ["PLC0415"]
164+
160165
[tool.marimo.runtime]
161166
on_cell_change = "autorun"

0 commit comments

Comments
 (0)