pre-commit-uv 4.0.2__tar.gz → 4.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pre-commit-uv
3
- Version: 4.0.2
3
+ Version: 4.1.0
4
4
  Summary: Run pre-commit with uv
5
5
  Project-URL: Bug Tracker, https://github.com/tox-dev/pre-commit-uv/issues
6
6
  Project-URL: Changelog, https://github.com/tox-dev/pre-commit-uv/releases
@@ -118,7 +118,7 @@ paths.source = [
118
118
  "**/src",
119
119
  "**\\src",
120
120
  ]
121
- report.fail_under = 65
121
+ report.fail_under = 63
122
122
  run.parallel = true
123
123
  run.plugins = [
124
124
  "covdefaults",
@@ -23,6 +23,17 @@ def _patch() -> None:
23
23
  from pre_commit import main # noqa: PLC0415
24
24
 
25
25
  _original_main, main.main = main.main, _new_main
26
+ if "--version" in sys.argv:
27
+ from importlib.metadata import version as _metadata_version # noqa: PLC0415
28
+
29
+ from pre_commit import constants # noqa: PLC0415
30
+
31
+ constants.VERSION = (
32
+ f"{constants.VERSION} ("
33
+ f"pre-commit-uv={_metadata_version('pre-commit-uv')}, "
34
+ f"uv={_metadata_version('uv')}"
35
+ f")"
36
+ )
26
37
 
27
38
 
28
39
  def _new_main(argv: list[str] | None = None) -> int:
@@ -54,7 +65,9 @@ def _new_main(argv: list[str] | None = None) -> int:
54
65
  py = python.norm_version(version)
55
66
  if py is not None:
56
67
  venv_cmd.extend(("-p", py))
57
- cmd_output_b(*venv_cmd, cwd="/")
68
+ env = os.environ.copy()
69
+ env["UV_INTERNAL__PARENT_INTERPRETER"] = sys.executable
70
+ cmd_output_b(*venv_cmd, cwd="/", env=env)
58
71
 
59
72
  with python.in_env(prefix, version):
60
73
  setup_cmd(prefix, (uv, "pip", "install", ".", *additional_dependencies))
File without changes
File without changes
File without changes
File without changes