Skip to content

Commit adade48

Browse files
committed
fixed errors and violations as a result of enbaling S rulesets
1 parent 5282ed2 commit adade48

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

earthaccess/store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def make_instance(
183183
# NOTE: This uses the first data_link listed in the granule. That's not
184184
# guaranteed to be the right one.
185185
return earthaccess.open([granule])[0]
186-
return EarthAccessFile(loads(data), granule)
186+
return EarthAccessFile(loads(data), granule) # noqa: S301
187187

188188

189189
def _get_url_granule_mapping(

pyproject.toml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,7 @@ ignore = [
219219
"PT012",
220220
"PT017",
221221
"PT027",
222-
"S101",
223-
"S108",
224222
"S113",
225-
"S301",
226-
"S603",
227-
"S607",
228223
"TD002",
229224
"TD003",
230225
"TD004"
@@ -236,7 +231,7 @@ combine-as-imports = true
236231
[tool.ruff.lint.per-file-ignores]
237232
# Allow `print` and `pprint` in notebooks
238233
"*.ipynb" = ["T201", "T203", "N803", "RET504", "ERA001", "PLR2004", "PD002", "PD010", "PD011", "EM", "ARG001", "BLE001", "FBT","TRY003"]
239-
"tests/**/*.py" = ["PLR2004", "FBT", "INP001", "SLF001"]
234+
"tests/**/*.py" = ["PLR2004", "FBT", "INP001", "SLF001", "S101", "S108", "S113", "S301", "S603", "S607"]
240235
"scripts/**/*.py" = ["INP001"]
241236

242237
[tool.ruff.lint.pydocstyle]

scripts/yamlfmt.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@
1414
"""
1515

1616
import platform
17+
import shutil
1718
import subprocess
1819
import sys
1920

21+
yamlfmt_path = shutil.which("yamlfmt")
22+
if yamlfmt_path is None:
23+
sys.exit("yamlfmt not found on PATH")
24+
2025
if platform.system() != "Windows":
21-
sys.exit(subprocess.call(["yamlfmt", *sys.argv[1:]]))
26+
sys.exit(subprocess.call([yamlfmt_path, *sys.argv[1:]])) # noqa: S603

0 commit comments

Comments
 (0)