From 159ed8614fbec43034c325c71d715e8941ad33a2 Mon Sep 17 00:00:00 2001 From: David McClosky Date: Fri, 8 Mar 2024 13:53:05 -0800 Subject: [PATCH 1/2] Aeroview uses `bat` to view JSON files --- src/aeromancy/aeroview.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/aeromancy/aeroview.py b/src/aeromancy/aeroview.py index 1e5fb99..5dbc51f 100644 --- a/src/aeromancy/aeroview.py +++ b/src/aeromancy/aeroview.py @@ -8,6 +8,7 @@ shell> pdm aeroview """ + import subprocess from pathlib import Path @@ -45,7 +46,7 @@ def view_aeromancy_uri( local_path = s3_client.fetch(s3) real_filename = Path(*aeromancy_uri.path) match real_filename.suffix: - case ".yaml": + case ".json" | ".yaml": subprocess.check_call( [ # noqa: S607 "bat", From 520060f62225683299ecb9ef1c3de5a0f1c25218 Mon Sep 17 00:00:00 2001 From: David McClosky Date: Fri, 8 Mar 2024 13:54:12 -0800 Subject: [PATCH 2/2] Set doc style to numpy in pyproject Without this, we get some spurious warnings. --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 5733013..8a46565 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -164,6 +164,9 @@ extend-exclude = ["tests/fixtures", "__pycache__"] target-version = "py310" namespace-packages = ["docs", "tasks"] +[tool.ruff.pydocstyle] +convention = "numpy" + [tool.ruff.per-file-ignores] "**/tests/*" = ["S101"] # Allow using asserts in tests