Commits on Source (9)
-
Sebastian Birunt authored
Remove redundant `print()` call to `stdout`.
c79de8d8 -
Sebastian Birunt authored
All `pip.parse` extensions from `rules_python` should have `experimental_index_url` attribute for correct platform dependent packages checkout. See: https://github.com/bazel-contrib/rules_python/blob/main/docs/pypi-dependencies.md#bazel-downloader-and-multi-platform-wheel-hub-repository
b4fecbec -
Matthew Clarkson authored
When a `CSafeDumper` is not available, we fallback to `SafeDumper`. This correctly invokes the `__del__` function in the order that the garbage collector runs. It results in the following error: ``` Exception ignored in: <function Closer.__del__ at 0x7f9547c3b420> Traceback (most recent call last): File ".../pre-commit/config/cli.runfiles/_main/pre-commit/config/cli.py", line 175, in __del__ self.close() File ".../pre-commit/config/cli.runfiles/_main/pre-commit/config/cli.py", line 170, in close self.__file.flush() File ".../python3.13/tempfile.py", line 499, in func_wrapper return func(*args, **kwargs) ValueError: I/O operation on closed file. ``` This occurs because the `NamedTemporaryFile.__del__` runs before the `Closer.__del__`. The `NamedTemporaryFile.__del__` closes then, then deletes the file. Setting `delete=False` will not help. We move the `NamedTemporaryFile` into the `Closer` (renamed to `TemporaryRedirectFile`) to correct the closing order.
Verifiedba670a07 -
Matthew Clarkson authoredVerified73ff12e2
-
Matthew Clarkson authoredVerifiedf303f8c8
-
Matthew Clarkson authored
We can use the `TemporaryRedirectFile` class directly as it implements the `SupportsWriteFlush[str]` protocol.
Verified2eab0cbe -
Matthew Clarkson authoredVerified6606f012
-
Matthew Clarkson authoredVerifiedfc12f15a
-
Bot authored
## [1.0.7](https://git.gitlab.arm.com/bazel/pre-commit/compare/v1.0.6...v1.0.7) (2025-06-03) ### Bug Fixes * correct temporary output move when using YAML `SafeDumper` ([ba670a07](https://git.gitlab.arm.com/bazel/pre-commit/commit/ba670a0709a4160595e9d496081692aac0927194)) * pip cross platform build ([b4fecbec](https://git.gitlab.arm.com/bazel/pre-commit/commit/b4fecbec073a75779638e089650a03ed074ecc15)) * redundant print ([c79de8d8](https://git.gitlab.arm.com/bazel/pre-commit/commit/c79de8d8edfed62afc9437d8bf6363495a94501c))
Showing
- .gitlab-ci.yml 1 addition, 1 deletion.gitlab-ci.yml
- CHANGELOG.md 8 additions, 0 deletionsCHANGELOG.md
- MODULE.bazel 3 additions, 1 deletionMODULE.bazel
- MODULE.bazel.lock 3198 additions, 411 deletionsMODULE.bazel.lock
- e2e/MODULE.bazel.lock 3198 additions, 411 deletionse2e/MODULE.bazel.lock
- hooks/.pre-commit-config.yaml 21 additions, 10 deletionshooks/.pre-commit-config.yaml
- pre-commit/config/cli.py 15 additions, 35 deletionspre-commit/config/cli.py
- pre-commit/hook/hook.py 0 additions, 1 deletionpre-commit/hook/hook.py
- pre-commit/hook/ruff/BUILD.bazel 27 additions, 1 deletionpre-commit/hook/ruff/BUILD.bazel
source diff could not be displayed: it is too large. Options to address this: view the blob.
source diff could not be displayed: it is too large. Options to address this: view the blob.