From 1e158ec45e7615e62686f9110a52ac9d89dd78a5 Mon Sep 17 00:00:00 2001 From: Min RK Date: Tue, 3 Sep 2024 11:00:16 +0200 Subject: [PATCH 1/2] update pre-commit hooks --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f07f1a9..24f11b9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,11 @@ repos: - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 24.8.0 hooks: - id: black language_version: python3 - repo: https://github.com/pycqa/flake8 - rev: 3.9.2 + rev: 7.1.1 hooks: - id: flake8 language_version: python3 From 40126796137418176c0eeac4f726552f31ab294a Mon Sep 17 00:00:00 2001 From: Min RK Date: Tue, 3 Sep 2024 11:00:45 +0200 Subject: [PATCH 2/2] run pre-commit --- docs/source/examples/dask-gateway.py | 1 + docs/source/examples/ndvi-blob-storage.py | 1 + kbatch-proxy/kbatch_proxy/main.py | 1 + kbatch-proxy/kbatch_proxy/patch.py | 1 + kbatch-proxy/tests/test_w_k8s.py | 1 + kbatch/kbatch/__init__.py | 1 + kbatch/kbatch/_backend.py | 1 + 7 files changed, 7 insertions(+) diff --git a/docs/source/examples/dask-gateway.py b/docs/source/examples/dask-gateway.py index eb2a464..f33270a 100644 --- a/docs/source/examples/dask-gateway.py +++ b/docs/source/examples/dask-gateway.py @@ -1,6 +1,7 @@ """ Start a cluster with Dask Gateway, print the dashboard link, and run some tasks. """ + import dask_gateway from distributed import wait diff --git a/docs/source/examples/ndvi-blob-storage.py b/docs/source/examples/ndvi-blob-storage.py index a776ac2..2967091 100644 --- a/docs/source/examples/ndvi-blob-storage.py +++ b/docs/source/examples/ndvi-blob-storage.py @@ -1,6 +1,7 @@ """ Compute NDVI for the latest Sentinel-2 image, saving to Blob Storage. """ + import io import os import pystac_client diff --git a/kbatch-proxy/kbatch_proxy/main.py b/kbatch-proxy/kbatch_proxy/main.py index 50bf8ba..c723286 100644 --- a/kbatch-proxy/kbatch_proxy/main.py +++ b/kbatch-proxy/kbatch_proxy/main.py @@ -153,6 +153,7 @@ def get_k8s_api() -> Tuple[kubernetes.client.CoreV1Api, kubernetes.client.BatchV # ---------------------------------------------------------------------------- # app + # cronjobs # @router.get("/cronjobs/{job_name}") async def read_cronjob(job_name: str, user: User = Depends(get_current_user)): diff --git a/kbatch-proxy/kbatch_proxy/patch.py b/kbatch-proxy/kbatch_proxy/patch.py index 934a48b..bbc4d8b 100644 --- a/kbatch-proxy/kbatch_proxy/patch.py +++ b/kbatch-proxy/kbatch_proxy/patch.py @@ -1,6 +1,7 @@ """ Patch a V1Job. """ + import re import string from typing import Dict, Optional, Union diff --git a/kbatch-proxy/tests/test_w_k8s.py b/kbatch-proxy/tests/test_w_k8s.py index a8ddf7b..91f674b 100644 --- a/kbatch-proxy/tests/test_w_k8s.py +++ b/kbatch-proxy/tests/test_w_k8s.py @@ -3,6 +3,7 @@ Starting a basic k3d cluster is the simpliest way to get started. See the documentation's "Dev Guide" for more information. """ + import json import pathlib diff --git a/kbatch/kbatch/__init__.py b/kbatch/kbatch/__init__.py index 8a9a13c..1f056ed 100644 --- a/kbatch/kbatch/__init__.py +++ b/kbatch/kbatch/__init__.py @@ -1,6 +1,7 @@ """ kbatch """ + from ._core import ( list_jobs, submit_job, diff --git a/kbatch/kbatch/_backend.py b/kbatch/kbatch/_backend.py index f25db8e..6447b49 100644 --- a/kbatch/kbatch/_backend.py +++ b/kbatch/kbatch/_backend.py @@ -3,6 +3,7 @@ This is used only by the kbatch backend. kbatch users do not have access to the Kubernetes API. """ + import pathlib import string import shutil