From bca8a8e205c3495f97122303f0bce38cc444aeec Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:46:41 +1000 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#1022) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/PyCQA/pylint: v3.1.0 → v3.2.3](https://github.com/PyCQA/pylint/compare/v3.1.0...v3.2.3) * Lintage for Pylint upgrade. * Non-pre-commit pylint too old. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Paul Haesler --- .github/workflows/lint.yml | 1 - .pre-commit-config.yaml | 2 +- datacube_ows/data.py | 2 ++ datacube_ows/ogc_utils.py | 2 +- setup.py | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5b82a9cc8..2ee1b0d17 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -38,7 +38,6 @@ jobs: - name: Install dependencies and run pylint run: | pip install .[test,dev] - pip install pylint pylint -j 2 --reports no datacube_ows --disable=C,R,W,E1136 flake8: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 29e018513..07a8b8497 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,7 +19,7 @@ repos: # hooks: # - id: bandit - repo: https://github.com/PyCQA/pylint - rev: v3.1.0 + rev: v3.2.3 hooks: - id: pylint args: ["--disable=C,R,W,E1136"] diff --git a/datacube_ows/data.py b/datacube_ows/data.py index 33a9b5da0..802a9501b 100644 --- a/datacube_ows/data.py +++ b/datacube_ows/data.py @@ -671,6 +671,8 @@ def get_s3_browser_uris(datasets, pt=None, s3url="", s3bucket=""): if ds.crs != last_crs: pt_native = pt.to_crs(ds.crs) last_crs = ds.crs + else: + pt_native = pt if ds.extent.contains(pt_native): uris.append(ds.uris) else: diff --git a/datacube_ows/ogc_utils.py b/datacube_ows/ogc_utils.py index 3d6458d20..0a620ef4f 100644 --- a/datacube_ows/ogc_utils.py +++ b/datacube_ows/ogc_utils.py @@ -526,7 +526,7 @@ def create_geobox( if width is not None: scale_x = (float(maxx) - float(minx)) / width else: - scale_x = -scale_y + scale_x = -scale_y # pylint: disable=possibly-used-before-assignment width = int(round((float(maxx) - float(minx)) / scale_x)) if height is None: scale_y = - scale_x diff --git a/setup.py b/setup.py index 8142763a8..4233d37df 100644 --- a/setup.py +++ b/setup.py @@ -50,7 +50,7 @@ dev_requirements = [ 'pydevd-pycharm~=221.5921.27', # For Pycharm 2022.1.3 - 'pylint==2.4.4', + 'pylint==3.2.3', 'sphinx_click', 'pre-commit==2.13.0', 'pipdeptree'