Skip to content

Commit 62a7df3

Browse files
Enable F401 (pyflakes unused imports) and TRY003 (flake8-tryceratops) rulesets and fix violations (#1361)
Co-authored-by: Matt Fisher <3608264+mfisher87@users.noreply.github.com>
1 parent 422a4b5 commit 62a7df3

5 files changed

Lines changed: 4 additions & 9 deletions

File tree

earthaccess/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import logging
22
import threading
3-
from typing import Optional
43

54
from .api import (
65
auth_environ,

earthaccess/virtual/_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

33
from collections.abc import Callable
4-
from typing import Any, Literal, Union
4+
from typing import Any, Literal
55

66
# A VirtualiZarr parser: either a canonical class-name string or a pre-built
77
# parser instance. The strings are the exact class names exported from

pyproject.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ ignore = [
210210
"D401",
211211
"D417",
212212
"E501",
213-
"F401",
214213
"FIX002",
215214
"PGH003",
216215
"PT006",
@@ -228,16 +227,15 @@ ignore = [
228227
"S607",
229228
"TD002",
230229
"TD003",
231-
"TD004",
232-
"TRY003",
230+
"TD004"
233231
]
234232

235233
[tool.ruff.lint.isort]
236234
combine-as-imports = true
237235

238236
[tool.ruff.lint.per-file-ignores]
239237
# Allow `print` and `pprint` in notebooks
240-
"*.ipynb" = ["T201", "T203", "N803", "RET504", "ERA001", "PLR2004", "PD002", "PD010", "PD011", "EM", "ARG001", "BLE001", "FBT"]
238+
"*.ipynb" = ["T201", "T203", "N803", "RET504", "ERA001", "PLR2004", "PD002", "PD010", "PD011", "EM", "ARG001", "BLE001", "FBT","TRY003"]
241239
"tests/**/*.py" = ["PLR2004", "FBT", "INP001", "SLF001"]
242240
"scripts/**/*.py" = ["INP001"]
243241

stubs/cmr/queries.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import sys
21
from collections.abc import MutableMapping, Sequence
32
from datetime import date, datetime
4-
from typing import Any, Self, SupportsFloat, TypeAlias
3+
from typing import Any, Self, SupportsFloat
54

65
CMR_OPS: str
76
CMR_UAT: str

tests/integration/test_cloud_download.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import logging
22
import operator as op
3-
import os
43
import shutil
54
from collections.abc import Callable
65
from pathlib import Path

0 commit comments

Comments
 (0)