Repository navigation
Bump the pre-commit-hooks group across 1 directory with 6 updates - #975
dependabot[bot] wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
It includes two confirmed logic bugs in the changed regions (filter_min/filter_max handling of 0.0, and an IndexError risk on empty arrays in text_formating) that should be fixed before merging.
Pull request overview
This PR updates the repository’s pre-commit toolchain (Poetry, Ruff, mypy, relint, codespell, rstcheck) and includes a series of small type-annotation cleanups (mainly reordering X | Y | None unions) likely produced by updated lint/type tooling.
Changes:
- Bump multiple pre-commit hook revisions in
.pre-commit-config.yaml. - Normalize/reorder several Python type annotations across workspace, IO, data, and UI JSON modules.
- Minor signature/annotation adjustments to align with newer typing/lint expectations.
File summaries
| File | Description |
|---|---|
geoh5py/workspace/workspace.py |
Type-annotation union order adjustment in get_entity. |
geoh5py/ui_json/ui_json.py |
Type-annotation union order adjustment for __pydantic_extra__. |
geoh5py/shared/utils.py |
Type-annotation union order adjustment for min_max_scaler(axis=...). |
geoh5py/objects/geo_image.py |
Type-annotation union order adjustment for _create_geoimage_from_attributes arg. |
geoh5py/io/h5_writer.py |
Type-annotation union order adjustment for fetch_handle return type. |
geoh5py/groups/interpretation_section.py |
Type-annotation union order adjustment for local metadata variable. |
geoh5py/data/visual_parameters.py |
Type-annotation union order adjustments for several properties/methods. |
geoh5py/data/text_data.py |
Type-annotation union order adjustment for text_formating signature. |
geoh5py/data/data_type.py |
Type-annotation union order adjustments around filter setters (also exposes a real logic bug). |
.pre-commit-config.yaml |
Bump hook versions for Poetry, Ruff, mypy, relint, codespell, rstcheck. |
Review details
Suppressed comments (3)
geoh5py/data/data_type.py:261
- The
filter_maxvalidation uses truthiness checks (if filter_min and value ...) which breaks for valid numeric values like0.0(skips the comparison) and also causes0.0to be stored asNoneviafloat(value) if value else None. Use explicitis not Nonechecks to preserve zero and validate correctly.
This issue also appears on line 282 of the same file.
filter_min: float | None = getattr(self, "_filter_min", None)
if filter_min and value and value < filter_min:
raise ValueError(
"Attribute 'filter_max' must be greater than or equal to 'filter_min'."
)
geoh5py/data/data_type.py:286
- The
filter_minvalidation uses truthiness checks (if filter_max and value ...) which breaks for valid numeric values like0.0(skips the comparison) and also causes0.0to be stored asNoneviafloat(value) if value else None. Use explicitis not Nonechecks to preserve zero and validate correctly.
filter_max: float | None = getattr(self, "_filter_max", None)
if filter_max and value and value > filter_max:
raise ValueError(
"Attribute 'filter_min' must be less than or equal to 'filter_max'."
)
geoh5py/data/text_data.py:36
text_formatingindexesvalues[0]to detect byte strings, which raisesIndexErrorfor an empty numpy array. SinceTextData.validate_valuespermits empty arrays, guardvalues.size == 0before indexing.
def text_formating(values: np.ndarray | str | None) -> ndarray | None:
"""
Format text values to utf-8.
:param values: The values to format.
- Files reviewed: 10/10 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@dependabot recreate |
Bumps the pre-commit-hooks group with 6 updates in the / directory: | Package | From | To | | --- | --- | --- | | [https://github.com/python-poetry/poetry](https://github.com/python-poetry/poetry) | `2.4.1` | `2.5.1` | | [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit) | `v0.15.15` | `0.16.10` | | [https://github.com/pre-commit/mirrors-mypy](https://github.com/pre-commit/mirrors-mypy) | `v1.15.0` | `2.4.0` | | [https://github.com/codingjoe/relint](https://github.com/codingjoe/relint) | `3.3.1` | `3.5.0` | | [https://github.com/codespell-project/codespell](https://github.com/codespell-project/codespell) | `v2.4.2` | `2.4.3` | | [https://github.com/rstcheck/rstcheck](https://github.com/rstcheck/rstcheck) | `v6.2.5` | `6.3.0` | Updates `https://github.com/python-poetry/poetry` from 2.4.1 to 2.5.1 - [Release notes](https://github.com/python-poetry/poetry/releases) - [Changelog](https://github.com/python-poetry/poetry/blob/main/CHANGELOG.md) - [Commits](python-poetry/poetry@2.4.1...2.5.1) Updates `https://github.com/astral-sh/ruff-pre-commit` from v0.15.15 to 0.16.10 - [Release notes](https://github.com/astral-sh/ruff-pre-commit/releases) - [Commits](astral-sh/ruff-pre-commit@v0.15.15...v0.16.10) Updates `https://github.com/pre-commit/mirrors-mypy` from v1.15.0 to 2.4.0 - [Commits](pre-commit/mirrors-mypy@v1.15.0...v2.4.0) Updates `https://github.com/codingjoe/relint` from 3.3.1 to 3.5.0 - [Release notes](https://github.com/codingjoe/relint/releases) - [Commits](codingjoe/relint@3.3.1...3.5.0) Updates `https://github.com/codespell-project/codespell` from v2.4.2 to 2.4.3 - [Release notes](https://github.com/codespell-project/codespell/releases) - [Commits](codespell-project/codespell@v2.4.2...v2.4.3) Updates `https://github.com/rstcheck/rstcheck` from v6.2.5 to 6.3.0 - [Changelog](https://github.com/rstcheck/rstcheck/blob/main/CHANGELOG.md) - [Commits](rstcheck/rstcheck@v6.2.5...v6.3.0) --- updated-dependencies: - dependency-name: https://github.com/astral-sh/ruff-pre-commit dependency-version: 0.16.6 dependency-type: direct:production dependency-group: pre-commit-hooks - dependency-name: https://github.com/codespell-project/codespell dependency-version: 2.4.3 dependency-type: direct:production dependency-group: pre-commit-hooks - dependency-name: https://github.com/codingjoe/relint dependency-version: 3.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: pre-commit-hooks - dependency-name: https://github.com/pre-commit/mirrors-mypy dependency-version: 2.3.1 dependency-type: direct:production dependency-group: pre-commit-hooks - dependency-name: https://github.com/python-poetry/poetry dependency-version: 2.4.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: pre-commit-hooks - dependency-name: https://github.com/rstcheck/rstcheck dependency-version: 6.3.0 dependency-type: direct:production dependency-group: pre-commit-hooks ... Signed-off-by: dependabot[bot] <support@github.com>
87cc4b9 to
440fcd3
Compare
|
|
for more information, see https://pre-commit.ci
Bumps the pre-commit-hooks group with 6 updates in the / directory:
2.4.12.5.1v0.15.150.16.10v1.15.02.4.03.3.13.5.0v2.4.22.4.3v6.2.56.3.0Updates
https://github.com/python-poetry/poetryfrom 2.4.1 to 2.5.1Release notes
Sourced from https://github.com/python-poetry/poetry's releases.
... (truncated)
Changelog
Sourced from https://github.com/python-poetry/poetry's changelog.
... (truncated)
Commits
94b6e35release: bump version to 2.5.1f8408cafix TypeError when usinginstaller.builtin-uninstall(#11077)165fb4brelease: bump version to 2.5.0c93fd63update poetry-core (#10921)32356aechore: update dependencies (#11075)d266d45test: accept compatible extension wheel tags (#11014)c8790a3add Python 3.15 to tests matrix (#11046)a416efdauthenticator: match host when looking up git credentials (#11074)e078ebfauthenticator: do not send credentials configured for https with http (#11073)8711c83authenticator: sort candidates by common path segments instead of prefixes (#...Updates
https://github.com/astral-sh/ruff-pre-commitfrom v0.15.15 to 0.16.10Release notes
Sourced from https://github.com/astral-sh/ruff-pre-commit's releases.
... (truncated)
Commits
f12be1eMirror: 0.16.106089d41Document addingquartototypes_orfor Quarto code fence formatting (#183)a56c0b9Mirror: 0.16.91b18dc6authorize astral-sh/ruff to dispatch the sync workflow (#182)b00ddaeBump astral-sh/setup-uv from 10.0.1 to 10.1.0 in the github-actions group (#181)2eeb567Mirror: 0.16.8e8f7d69Mirror: 0.16.7321478eMirror: 0.16.61f1e8bfMirror: 0.16.5e4c52d6Addmarkdowntotypes_or(#159)Updates
https://github.com/pre-commit/mirrors-mypyfrom v1.15.0 to 2.4.0Commits
2834ec6Mirror: 2.4.07ff8d35Mirror: 2.3.141e6916Mirror: 2.3.00cbe8f6Mirror: 2.2.0d2823d3Mirror: 2.1.0a9d9ff5Mirror: 2.0.0fc0f09aMirror: 1.20.20f369d2Mirror: 1.20.18e5c807Mirror: 1.20.0a66e98dMirror: 1.19.1Updates
https://github.com/codingjoe/relintfrom 3.3.1 to 3.5.0Release notes
Sourced from https://github.com/codingjoe/relint's releases.
Commits
b1c90dfResolve #114 -- Always wrap code printed to the console (#146)757bca4[pre-commit.ci] pre-commit autoupdatec845e27[pre-commit.ci] pre-commit autoupdatea9c0e38Bump actions/checkout from 6 to 7fad6d65Limit allowed toolsd5a7f5fAdd Skills via Claude plugin3751a69[pre-commit.ci] pre-commit autoupdated36fea4Revert funding file49a477bFix #133 -- Handle git diff mnemonic prefixes (#137)8ace03a[pre-commit.ci] pre-commit autoupdateUpdates
https://github.com/codespell-project/codespellfrom v2.4.2 to 2.4.3Release notes
Sourced from https://github.com/codespell-project/codespell's releases.
... (truncated)
Commits
57b2140Read only [tool.codespell] from TOML config (#3975)23b8d94[pre-commit.ci] pre-commit autoupdate926c4d6[pre-commit.ci] pre-commit autoupdate820a301Merge pull request #3967 from codespell-project/peternewman-patch-19fe42c9Add common misspellings for reseeve->reserve to dictionary725173c[pre-commit.ci] pre-commit autoupdate86c13ee[pre-commit.ci] pre-commit autoupdate7b9f36cBump actions/checkout from 6 to 7bcc1b80Add spelling corrections for simpe and variants.89584cc[pre-commit.ci] pre-commit autoupdateUpdates
https://github.com/rstcheck/rstcheckfrom v6.2.5 to 6.3.0Changelog
Sourced from https://github.com/rstcheck/rstcheck's changelog.
Commits
d8774e9"release v6.3.0 [skip ci]"382bcc8Merge pull request #254 from rstcheck/support-rstcheck-core-1_3_193a53bdupdate changelogf69ee7cadd flag for new sphinx_source_dir setting88c8248bump min rstcheck-core version to 1.3.1b4f9612Merge pull request #253 from rstcheck/pre-commit-ci-update-config436c085ignore argument count of cli function2608287[pre-commit.ci] auto fixes from pre-commit.com hooks4be06fb[pre-commit.ci] pre-commit autoupdate96719d9Merge pull request #250 from rstcheck/pre-commit-ci-update-config