Skip to content

[pre-commit.ci] pre-commit autoupdate - #97

Merged
gmgunter merged 2 commits into
mainfrom
pre-commit-ci-update-config
Sep 3, 2025
Merged

gmgunter merged 2 commits into
mainfrom
pre-commit-ci-update-config

Conversation

@pre-commit-ci
pre-commit-ci Bot requested a review from gmgunter as a code owner December 23, 2024 20:18
@codecov

codecov Bot commented Dec 23, 2024 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.06%. Comparing base (dfbbf2e) to head (b062304).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #97      +/-   ##
==========================================
+ Coverage   94.03%   94.06%   +0.02%     
==========================================
  Files           9        9              
  Lines         453      455       +2     
==========================================
+ Hits          426      428       +2     
  Misses         27       27              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch 2 times, most recently from 82f063f to b43a390 Compare January 13, 2025 20:12
@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch from b43a390 to 9d12783 Compare January 20, 2025 20:05
@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch from 9d12783 to cffb12e Compare January 27, 2025 20:15
@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch 2 times, most recently from 622f6a9 to 198addd Compare February 10, 2025 20:18
@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch from 198addd to 8bd14b2 Compare February 24, 2025 18:07
@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch 2 times, most recently from d784e96 to a4f006a Compare March 10, 2025 18:13
@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch 2 times, most recently from d263dda to 64ff55c Compare March 24, 2025 18:11
@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch 2 times, most recently from 01b3c77 to 0cf10af Compare April 14, 2025 18:09
@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch from 0cf10af to bbfb73d Compare April 21, 2025 18:04
@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch from bbfb73d to 4771abb Compare April 28, 2025 18:06
@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch 2 times, most recently from 0030548 to 9e6a8f6 Compare May 12, 2025 18:08
@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch 2 times, most recently from 5e9f8ef to 562694b Compare May 26, 2025 18:08
@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch 2 times, most recently from fd767b5 to 7bbfa69 Compare June 9, 2025 18:10
@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch 2 times, most recently from 758cdca to 727883c Compare June 30, 2025 18:06
@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch 2 times, most recently from 93ad482 to 5f92d49 Compare July 14, 2025 18:13
@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch from 5f92d49 to a16d7c7 Compare July 21, 2025 18:20
@scottstanie

Copy link
Copy Markdown
Contributor

@gmgunter do you have an opinion on these ruff updates causing pre-commit errors?

Details

src/snaphu/_util.py:199:17: RUF005 Consider `(slice_.stop - slice_.start, *dataset.shape[1:])` instead of concatenation
    |
197 |     for slice_ in slices(0, n, batchsize):
198 |         # Infer the shape and size of the corresponding slice of the dataset.
199 |         shape = (slice_.stop - slice_.start,) + dataset.shape[1:]
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUF005
200 |         size = np.prod(shape)
    |
    = help: Replace with `(slice_.stop - slice_.start, *dataset.shape[1:])`

src/snaphu/io/__init__.py:15:9: PLC0415 `import` should be at the top-level of a file
   |
13 |         # This module depends on `rasterio` so load it lazily to avoid an ImportError
14 |         # for users that don't need `Raster`.
15 |         from ._raster import Raster
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ PLC0415
16 |
17 |         return Raster
   |

src/snaphu/io/__init__.py:28:9: PLC0415 `import` should be at the top-level of a file
   |
26 | def __dir__() -> list[str]:
27 |     try:
28 |         from ._raster import Raster
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ PLC0415
29 |     except ModuleNotFoundError:
30 |         return __all__
   |

src/snaphu/io/_raster.py:272:47: FBT001 Boolean-typed positional argument in function definition
    |
271 |     def __array__(
272 |         self, dtype: DTypeLike | None = None, copy: bool | None = None
    |                                               ^^^^ FBT001
273 |     ) -> np.ndarray:
274 |         if not copy and (copy is not None):
    |

test/io/test_raster.py:67:5: PLC0415 `import` should be at the top-level of a file
   |
65 |         The raster.
66 |     """
67 |     import rasterio
   |     ^^^^^^^^^^^^^^^ PLC0415
68 |
69 |     height, width = shape
   |

test/io/test_raster.py:115:9: PLC0415 `import` should be at the top-level of a file
    |
113 | def test_bad_raster_import():
114 |     with pytest.raises(ImportError, match=r"^No module named 'rasterio'$"):
115 |         from snaphu.io import Raster  # noqa: F401
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PLC0415
    |

test/io/test_raster.py:196:9: PLC0415 `import` should be at the top-level of a file
    |
195 |     def test_crs(self, geotiff_raster: snaphu.io.Raster):
196 |         import rasterio
    |         ^^^^^^^^^^^^^^^ PLC0415
197 |
198 |         assert geotiff_raster.crs == rasterio.crs.CRS.from_epsg(4326)
    |

test/io/test_raster.py:201:9: PLC0415 `import` should be at the top-level of a file
    |
200 |     def test_transform(self, geotiff_raster: snaphu.io.Raster):
201 |         import rasterio
    |         ^^^^^^^^^^^^^^^ PLC0415
202 |
203 |         height, width = 1024, 512
    |


Fixed 3 errors:
- src/snaphu/io/_raster.py:
    1 × I001 (unsorted-imports)
    1 × D403 (first-word-uncapitalized)
    1 × PYI019 (custom-type-var-for-self)

@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch from a16d7c7 to e374435 Compare July 28, 2025 18:17
@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch from e374435 to 97cd030 Compare August 4, 2025 18:36
@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch 2 times, most recently from b58472a to 6a5af5a Compare August 18, 2025 18:26
@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch from 6a5af5a to 3cfaf22 Compare August 25, 2025 18:22
@pre-commit-ci
pre-commit-ci Bot force-pushed the pre-commit-ci-update-config branch from 3cfaf22 to 4e7cc41 Compare September 1, 2025 18:25
pre-commit-ci Bot and others added 2 commits September 3, 2025 19:22
updates:
- [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](pre-commit/pre-commit-hooks@v5.0.0...v6.0.0)
- [github.com/sirosen/texthooks: 0.6.8 → 0.7.1](sirosen/texthooks@0.6.8...0.7.1)
- [github.com/psf/black: 24.10.0 → 25.1.0](psf/black@24.10.0...25.1.0)
- [github.com/pre-commit/mirrors-mypy: v1.13.0 → v1.17.1](pre-commit/mirrors-mypy@v1.13.0...v1.17.1)
- [github.com/astral-sh/ruff-pre-commit: v0.8.3 → v0.12.11](astral-sh/ruff-pre-commit@v0.8.3...v0.12.11)
@gmgunter
gmgunter force-pushed the pre-commit-ci-update-config branch from 4e7cc41 to b062304 Compare September 3, 2025 19:51
@gmgunter
gmgunter merged commit 0b6dbd3 into main Sep 3, 2025
18 checks passed
@gmgunter
gmgunter deleted the pre-commit-ci-update-config branch September 3, 2025 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants