diff --git a/earthaccess/store.py b/earthaccess/store.py index da2c74ca..60e63147 100644 --- a/earthaccess/store.py +++ b/earthaccess/store.py @@ -183,7 +183,7 @@ def make_instance( # NOTE: This uses the first data_link listed in the granule. That's not # guaranteed to be the right one. return earthaccess.open([granule])[0] - return EarthAccessFile(loads(data), granule) + return EarthAccessFile(loads(data), granule) # noqa: S301 def _get_url_granule_mapping( diff --git a/pyproject.toml b/pyproject.toml index 16ce83ea..044887bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -211,7 +211,6 @@ ignore = [ "D417", "E501", "FIX002", - "PGH003", "PT006", "PT007", "PT009", @@ -219,12 +218,7 @@ ignore = [ "PT012", "PT017", "PT027", - "S101", - "S108", "S113", - "S301", - "S603", - "S607", "TD002", "TD003", "TD004" @@ -236,7 +230,7 @@ combine-as-imports = true [tool.ruff.lint.per-file-ignores] # Allow `print` and `pprint` in notebooks "*.ipynb" = ["T201", "T203", "N803", "RET504", "ERA001", "PLR2004", "PD002", "PD010", "PD011", "EM", "ARG001", "BLE001", "FBT","TRY003"] -"tests/**/*.py" = ["PLR2004", "FBT", "INP001", "SLF001"] +"tests/**/*.py" = ["PLR2004", "FBT", "INP001", "SLF001", "S101", "S108", "S301", "S603", "S607"] "scripts/**/*.py" = ["INP001"] [tool.ruff.lint.pydocstyle] diff --git a/scripts/yamlfmt.py b/scripts/yamlfmt.py index 56886adf..95572722 100644 --- a/scripts/yamlfmt.py +++ b/scripts/yamlfmt.py @@ -14,8 +14,13 @@ """ import platform +import shutil import subprocess import sys +yamlfmt_path = shutil.which("yamlfmt") +if yamlfmt_path is None: + sys.exit("yamlfmt not found on PATH") + if platform.system() != "Windows": - sys.exit(subprocess.call(["yamlfmt", *sys.argv[1:]])) + sys.exit(subprocess.call([yamlfmt_path, *sys.argv[1:]])) # noqa: S603