diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a061dab..cc819da 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: trailing-whitespace exclude: tests/data @@ -14,7 +14,7 @@ repos: files: requirements-dev.txt - repo: https://github.com/econchick/interrogate - rev: 1.5.0 + rev: 1.7.0 hooks: - id: interrogate exclude: ^(docs|setup.py|tests) @@ -26,27 +26,27 @@ repos: - id: blackdoc - repo: https://github.com/pycqa/flake8 - rev: 6.1.0 + rev: 7.1.1 hooks: - id: flake8 exclude: docs/source/conf.py args: [--max-line-length=105] - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort additional_dependencies: [toml] args: ["--profile", "black", "--filter-files"] - repo: https://github.com/psf/black - rev: 23.11.0 + rev: 24.8.0 hooks: - id: black language_version: python3 - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.7.0 + rev: v1.11.1 hooks: - id: mypy exclude: docs/source/conf.py @@ -55,14 +55,14 @@ repos: [typing_extensions>=4.2.0, types-setuptools, types-PyYAML] - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.3.0 hooks: - id: codespell args: - --quiet-level=2 - repo: https://github.com/asottile/pyupgrade - rev: v3.15.0 + rev: v3.17.0 hooks: - id: pyupgrade args: diff --git a/noxfile.py b/noxfile.py index 3d29cbb..fc4b818 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,4 +1,5 @@ """Test against the same matrix as Github Actions""" + import nox import yaml diff --git a/xpublish_edr/formats/to_covjson.py b/xpublish_edr/formats/to_covjson.py index 3a5c4d2..a8579c1 100644 --- a/xpublish_edr/formats/to_covjson.py +++ b/xpublish_edr/formats/to_covjson.py @@ -1,6 +1,7 @@ """ Generate CoverageJSON responses for xarray Dataset for EDR queries """ + import sys from typing import Dict, List diff --git a/xpublish_edr/formats/to_csv.py b/xpublish_edr/formats/to_csv.py index 436f81c..36fc2ad 100644 --- a/xpublish_edr/formats/to_csv.py +++ b/xpublish_edr/formats/to_csv.py @@ -1,6 +1,7 @@ """ Generate CSV responses for an xarray dataset for EDR queries """ + import xarray as xr from fastapi import Response diff --git a/xpublish_edr/formats/to_netcdf.py b/xpublish_edr/formats/to_netcdf.py index 1580771..d3bb7dc 100644 --- a/xpublish_edr/formats/to_netcdf.py +++ b/xpublish_edr/formats/to_netcdf.py @@ -1,6 +1,7 @@ """ Generate a NetCDF from an xarray Dataset for EDR queries """ + from pathlib import Path from tempfile import TemporaryDirectory diff --git a/xpublish_edr/plugin.py b/xpublish_edr/plugin.py index fab7bb0..62f2f2e 100644 --- a/xpublish_edr/plugin.py +++ b/xpublish_edr/plugin.py @@ -1,6 +1,7 @@ """ OGC EDR router for datasets with CF convention metadata """ + import importlib import logging from typing import List, Optional diff --git a/xpublish_edr/query.py b/xpublish_edr/query.py index 22b1d1f..d6a3465 100644 --- a/xpublish_edr/query.py +++ b/xpublish_edr/query.py @@ -1,6 +1,7 @@ """ OGC EDR Query param parsing """ + from typing import Optional from fastapi import Query