LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust
showcase: check the file is readable without an empty with-block (#3001)
Dylan M. Taylor8020cd081ce9
diff --git a/docs/showcase/__pycache__/run.cpython-314.pyc b/docs/showcase/__pycache__/run.cpython-314.pycnew file mode 100644index 000000000..de0f9a97eBinary files /dev/null and b/docs/showcase/__pycache__/run.cpython-314.pyc differdiff --git a/docs/showcase/run.py b/docs/showcase/run.pyindex 828f8decc..05de581af 100644--- a/docs/showcase/run.py+++ b/docs/showcase/run.py@@ -14,8 +14,7 @@ def _jsonl_path(arg):if not path.is_file():sys.exit(f"not a readable file: {arg}")try:- with path.open("rb"):- pass+ path.open("rb").close()except OSError:sys.exit(f"not a readable file: {arg}")return path