From 29b480b8a2ee653ba219ec4cfc8c22a3c69f5db3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 09:31:19 +1200 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#99) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v4.6.0) - [github.com/astral-sh/ruff-pre-commit: v0.4.5 → v0.5.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.5...v0.5.0) * Use 'is' for type comparison --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Mike Taves --- .pre-commit-config.yaml | 4 ++-- swn/file.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0fe7f27..6f27e8c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,13 +2,13 @@ ci: autoupdate_schedule: quarterly repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.5 + rev: v0.5.0 hooks: # Run the linter. - id: ruff diff --git a/swn/file.py b/swn/file.py index d86524f..cccae92 100644 --- a/swn/file.py +++ b/swn/file.py @@ -165,7 +165,7 @@ def gdf_to_shapefile(gdf, shp_fname, **kwargs): for col, dtype in gdf.dtypes.items(): if col == geom_name: continue - if dtype == bool: + if dtype is bool: gdf[col] = gdf[col].astype(int) elif np.issubdtype(dtype, np.number): pass