From e60272c3ac7edd566ce93ec2be90893fc490cc30 Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Thu, 19 Feb 2026 11:39:15 -0500 Subject: [PATCH 1/7] Replace pre-commit with prek, add priority --- .pre-commit-config.yaml | 11 ++--- pyproject.toml | 2 +- uv.lock | 98 ++++++++++------------------------------- 3 files changed, 27 insertions(+), 84 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8285e4f6ce8..553cb39c68c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,3 @@ -ci: - autofix_prs: false - # We use Renovate to update this file now, but we can't disable automatic pre-commit updates - # when using the `pre-commit` GitHub Action, so we set the schedule to quarterly to avoid - # frequent updates. - autoupdate_schedule: quarterly - autoupdate_commit_msg: 'Bump `pre-commit` Hooks to Latest Versions' - repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: 'v0.15.1' @@ -29,6 +21,7 @@ repos: - cachetools>=7.0.0,<8.0.0 - aiolimiter~=1.1,<1.3 - . # this basically does `pip install -e .` + priority: 10 - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.19.1 hooks: @@ -46,6 +39,7 @@ repos: - cachetools>=7.0.0,<8.0.0 - aiolimiter~=1.1,<1.3 - . # this basically does `pip install -e .` + priority: 10 - id: mypy name: mypy-examples files: ^examples/.*\.py$ @@ -58,3 +52,4 @@ repos: - APScheduler>=3.10.4,<3.12.0 - cachetools>=7.0.0,<8.0.0 - . # this basically does `pip install -e .` + priority: 10 diff --git a/pyproject.toml b/pyproject.toml index 97d0319bedf..307e0cd017e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -132,7 +132,7 @@ docs = [ "pydantic >= 2.12.0a1 ; python_version >= '3.14'" ] linting = [ - "pre-commit", + "prek", "ruff==0.15.1", "mypy==1.18.2", "pylint==4.0.4" diff --git a/uv.lock b/uv.lock index 9e3728e0b66..91e946ae262 100644 --- a/uv.lock +++ b/uv.lock @@ -225,15 +225,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ae/3a/dbeec9d1ee0844c679f6bb5d6ad4e9f198b1224f4e7a32825f47f6192b0c/cffi-2.0.0-cp314-cp314t-win_arm64.whl", hash = "sha256:0a1527a803f0a659de1af2e1fd700213caba79377e27e4693648c2923da066f9", size = 184195, upload-time = "2025-09-08T23:23:43.004Z" }, ] -[[package]] -name = "cfgv" -version = "3.4.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/11/74/539e56497d9bd1d484fd863dd69cbbfa653cd2aa27abfe35653494d85e94/cfgv-3.4.0.tar.gz", hash = "sha256:e52591d4c5f5dead8e0f673fb16db7949d2cfb3f7da4582893288f0ded8fe560", size = 7114, upload-time = "2023-08-12T20:38:17.776Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/c5/55/51844dd50c4fc7a33b653bfaba4c2456f06955289ca770a5dbd5fd267374/cfgv-3.4.0-py2.py3-none-any.whl", hash = "sha256:b7265b1f29fd3316bfcd2b330d63d024f2bfd8bcb8b0272f8e19a504856c48f9", size = 7249, upload-time = "2023-08-12T20:38:16.269Z" }, -] - [[package]] name = "chango" version = "0.6.0" @@ -533,15 +524,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/50/3d/9373ad9c56321fdab5b41197068e1d8c25883b3fea29dd361f9b55116869/dill-0.4.0-py3-none-any.whl", hash = "sha256:44f54bf6412c2c8464c14e8243eb163690a9800dbe2c367330883b19c7561049", size = 119668, upload-time = "2025-04-16T00:41:47.671Z" }, ] -[[package]] -name = "distlib" -version = "0.4.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/96/8e/709914eb2b5749865801041647dc7f4e6d00b549cfe88b65ca192995f07c/distlib-0.4.0.tar.gz", hash = "sha256:feec40075be03a04501a973d81f633735b4b69f98b05450592310c0f401a4e0d", size = 614605, upload-time = "2025-07-17T16:52:00.465Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/33/6b/e0547afaf41bf2c42e52430072fa5658766e3d65bd4b03a563d1b6336f57/distlib-0.4.0-py2.py3-none-any.whl", hash = "sha256:9659f7d87e46584a30b5780e43ac7a2143098441670ff0a49d5f9034c54a6c16", size = 469047, upload-time = "2025-07-17T16:51:58.613Z" }, -] - [[package]] name = "docutils" version = "0.21.2" @@ -572,15 +554,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/43/09/2aea36ff60d16dd8879bdb2f5b3ee0ba8d08cbbdcdfe870e695ce3784385/execnet-2.1.1-py3-none-any.whl", hash = "sha256:26dee51f1b80cebd6d0ca8e74dd8745419761d3bef34163928cbebbdc4749fdc", size = 40612, upload-time = "2024-04-08T09:04:17.414Z" }, ] -[[package]] -name = "filelock" -version = "3.20.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/58/46/0028a82567109b5ef6e4d2a1f04a583fb513e6cf9527fcdd09afd817deeb/filelock-3.20.0.tar.gz", hash = "sha256:711e943b4ec6be42e1d4e6690b48dc175c822967466bb31c0c293f34334c13f4", size = 18922, upload-time = "2025-10-08T18:03:50.056Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/76/91/7216b27286936c16f5b4d0c530087e4a54eead683e6b0b73dd0c64844af6/filelock-3.20.0-py3-none-any.whl", hash = "sha256:339b4732ffda5cd79b13f4e2711a31b0365ce445d95d243bb996273d072546a2", size = 16054, upload-time = "2025-10-08T18:03:48.35Z" }, -] - [[package]] name = "flaky" version = "3.8.1" @@ -683,15 +656,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/48/30/47d0bf6072f7252e6521f3447ccfa40b421b6824517f82854703d0f5a98b/hyperframe-6.1.0-py3-none-any.whl", hash = "sha256:b03380493a519fce58ea5af42e4a42317bf9bd425596f7a0835ffce80f1a42e5", size = 13007, upload-time = "2025-01-22T21:41:47.295Z" }, ] -[[package]] -name = "identify" -version = "2.6.15" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ff/e7/685de97986c916a6d93b3876139e00eef26ad5bbbd61925d670ae8013449/identify-2.6.15.tar.gz", hash = "sha256:e4f4864b96c6557ef2a1e1c951771838f4edc9df3a72ec7118b338801b11c7bf", size = 99311, upload-time = "2025-10-02T17:43:40.631Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/0f/1c/e5fd8f973d4f375adb21565739498e2e9a1e54c858a97b9a8ccfdc81da9b/identify-2.6.15-py2.py3-none-any.whl", hash = "sha256:1181ef7608e00704db228516541eb83a88a9f94433a8c80bb9b5bd54b1d81757", size = 99183, upload-time = "2025-10-02T17:43:39.137Z" }, -] - [[package]] name = "idna" version = "3.11" @@ -921,15 +885,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", size = 4963, upload-time = "2025-04-22T14:54:22.983Z" }, ] -[[package]] -name = "nodeenv" -version = "1.9.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/43/16/fc88b08840de0e0a72a2f9d8c6bae36be573e475a6326ae854bcc549fc45/nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f", size = 47437, upload-time = "2024-06-04T18:44:11.171Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d2/1d/1b658dbd2b9fa9c4c9f32accbfc0205d532c8c6194dc0f2a4c0428e7128a/nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9", size = 22314, upload-time = "2024-06-04T18:44:08.352Z" }, -] - [[package]] name = "packaging" version = "25.0" @@ -967,19 +922,27 @@ wheels = [ ] [[package]] -name = "pre-commit" -version = "4.3.0" +name = "prek" +version = "0.3.3" source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "cfgv" }, - { name = "identify" }, - { name = "nodeenv" }, - { name = "pyyaml" }, - { name = "virtualenv" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/ff/29/7cf5bbc236333876e4b41f56e06857a87937ce4bf91e117a6991a2dbb02a/pre_commit-4.3.0.tar.gz", hash = "sha256:499fe450cc9d42e9d58e606262795ecb64dd05438943c62b66f6a8673da30b16", size = 193792, upload-time = "2025-08-09T18:56:14.651Z" } +sdist = { url = "https://files.pythonhosted.org/packages/bf/f1/7613dc8347a33e40fc5b79eec6bc7d458d8bbc339782333d8433b665f86f/prek-0.3.3.tar.gz", hash = "sha256:117bd46ebeb39def24298ce021ccc73edcf697b81856fcff36d762dd56093f6f", size = 343697, upload-time = "2026-02-15T13:33:28.723Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/5b/a5/987a405322d78a73b66e39e4a90e4ef156fd7141bf71df987e50717c321b/pre_commit-4.3.0-py2.py3-none-any.whl", hash = "sha256:2b0747ad7e6e967169136edffee14c16e148a778a54e4f967921aa1ebf2308d8", size = 220965, upload-time = "2025-08-09T18:56:13.192Z" }, + { url = "https://files.pythonhosted.org/packages/2d/8b/dce13d2a3065fd1e8ffce593a0e51c4a79c3cde9c9a15dc0acc8d9d1573d/prek-0.3.3-py3-none-linux_armv6l.whl", hash = "sha256:e8629cac4bdb131be8dc6e5a337f0f76073ad34a8305f3fe2bc1ab6201ede0a4", size = 4644636, upload-time = "2026-02-15T13:33:43.609Z" }, + { url = "https://files.pythonhosted.org/packages/01/30/06ab4dbe7ce02a8ce833e92deb1d9a8e85ae9d40e33d1959a2070b7494c6/prek-0.3.3-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:4b9e819b9e4118e1e785047b1c8bd9aec7e4d836ed034cb58b7db5bcaaf49437", size = 4651410, upload-time = "2026-02-15T13:33:34.277Z" }, + { url = "https://files.pythonhosted.org/packages/d4/fc/da3bc5cb38471e7192eda06b7a26b7c24ef83e82da2c1dbc145f2bf33640/prek-0.3.3-py3-none-macosx_11_0_arm64.whl", hash = "sha256:bf29db3b5657c083eb8444c25aadeeec5167dc492e9019e188f87932f01ea50a", size = 4273163, upload-time = "2026-02-15T13:33:42.106Z" }, + { url = "https://files.pythonhosted.org/packages/b4/74/47839395091e2937beced81a5dd2f8ea9c8239c853da8611aaf78ee21a8b/prek-0.3.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:ae09736149815b26e64a9d350ca05692bab32c2afdf2939114d3211aaad68a3e", size = 4631808, upload-time = "2026-02-15T13:33:20.076Z" }, + { url = "https://files.pythonhosted.org/packages/e2/89/3f5ef6f7c928c017cb63b029349d6bc03598ab7f6979d4a770ce02575f82/prek-0.3.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:856c2b55c51703c366bb4ce81c6a91102b70573a9fc8637db2ac61c66e4565f9", size = 4548959, upload-time = "2026-02-15T13:33:36.325Z" }, + { url = "https://files.pythonhosted.org/packages/b2/18/80002c4c4475f90ca025f27739a016927a0e5d905c60612fc95da1c56ab7/prek-0.3.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3acdf13a018f685beaff0a71d4b0d2ccbab4eaa1aced6d08fd471c1a654183eb", size = 4862256, upload-time = "2026-02-15T13:33:37.754Z" }, + { url = "https://files.pythonhosted.org/packages/c5/25/648bf084c2468fa7cfcdbbe9e59956bbb31b81f36e113bc9107d80af26a7/prek-0.3.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0f035667a8bd0a77b2bfa2b2e125da8cb1793949e9eeef0d8daab7f8ac8b57fe", size = 5404486, upload-time = "2026-02-15T13:33:39.239Z" }, + { url = "https://files.pythonhosted.org/packages/8b/43/261fb60a11712a327da345912bd8b338dc5a050199de800faafa278a6133/prek-0.3.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d09b2ad14332eede441d977de08eb57fb3f61226ed5fd2ceb7aadf5afcdb6794", size = 4887513, upload-time = "2026-02-15T13:33:40.702Z" }, + { url = "https://files.pythonhosted.org/packages/c7/2c/581e757ee57ec6046b32e0ee25660fc734bc2622c319f57119c49c0cab58/prek-0.3.3-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:c0c3ffac16e37a9daba43a7e8316778f5809b70254be138761a8b5b9ef0df28e", size = 4632336, upload-time = "2026-02-15T13:33:25.867Z" }, + { url = "https://files.pythonhosted.org/packages/d5/d8/aa276ce5d11b77882da4102ca0cb7161095831105043ae7979bbfdcc3dc4/prek-0.3.3-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:a3dc7720b580c07c0386e17af2486a5b4bc2f6cc57034a288a614dcbc4abe555", size = 4679370, upload-time = "2026-02-15T13:33:22.247Z" }, + { url = "https://files.pythonhosted.org/packages/70/19/9d4fa7bde428e58d9f48a74290c08736d42aeb5690dcdccc7a713e34a449/prek-0.3.3-py3-none-musllinux_1_1_armv7l.whl", hash = "sha256:60e0fa15da5020a03df2ee40268145ec5b88267ec2141a205317ad4df8c992d6", size = 4540316, upload-time = "2026-02-15T13:33:24.088Z" }, + { url = "https://files.pythonhosted.org/packages/25/b5/973cce29257e0b47b16cc9b4c162772ea01dbb7c080791ea0c068e106e05/prek-0.3.3-py3-none-musllinux_1_1_i686.whl", hash = "sha256:553515da9586d9624dc42db32b744fdb91cf62b053753037a0cadb3c2d8d82a2", size = 4724566, upload-time = "2026-02-15T13:33:29.832Z" }, + { url = "https://files.pythonhosted.org/packages/d6/8b/ad8b2658895a8ed2b0bc630bf38686fe38b7ff2c619c58953a80e4de3048/prek-0.3.3-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:9512cf370e0d1496503463a4a65621480efb41b487841a9e9ff1661edf14b238", size = 4995072, upload-time = "2026-02-15T13:33:27.417Z" }, + { url = "https://files.pythonhosted.org/packages/fd/b7/0540c101c00882adb9d30319d22d8f879413598269ecc60235e41875efd4/prek-0.3.3-py3-none-win32.whl", hash = "sha256:b2b328c7c6dc14ccdc79785348589aa39850f47baff33d8f199f2dee80ff774c", size = 4293144, upload-time = "2026-02-15T13:33:46.013Z" }, + { url = "https://files.pythonhosted.org/packages/97/c7/e4f11da653093040efba2d835aa0995d78940aea30887287aeaebe34a545/prek-0.3.3-py3-none-win_amd64.whl", hash = "sha256:3d7d7acf7ca8db65ba0943c52326c898f84bab0b1c26a35c87e0d177f574ca5f", size = 4652761, upload-time = "2026-02-15T13:33:32.962Z" }, + { url = "https://files.pythonhosted.org/packages/11/e4/d99dec54c6a5fb2763488bff6078166383169a93f3af27d2edae88379a39/prek-0.3.3-py3-none-win_arm64.whl", hash = "sha256:8aa87ee7628cd74482c0dd6537a3def1f162b25cd642d78b1b35dd3e81817f60", size = 4367520, upload-time = "2026-02-15T13:33:31.664Z" }, ] [[package]] @@ -1292,7 +1255,7 @@ all = [ { name = "flaky" }, { name = "furo" }, { name = "mypy" }, - { name = "pre-commit" }, + { name = "prek" }, { name = "pydantic", marker = "python_full_version >= '3.14'" }, { name = "pylint" }, { name = "pytest" }, @@ -1322,7 +1285,7 @@ docs = [ ] linting = [ { name = "mypy" }, - { name = "pre-commit" }, + { name = "prek" }, { name = "pylint" }, { name = "ruff" }, ] @@ -1373,7 +1336,7 @@ all = [ { name = "flaky", specifier = ">=3.8.1" }, { name = "furo", specifier = "==2025.9.25" }, { name = "mypy", specifier = "==1.18.2" }, - { name = "pre-commit" }, + { name = "prek" }, { name = "pydantic", marker = "python_full_version >= '3.14'", specifier = ">=2.12.0a1" }, { name = "pylint", specifier = "==4.0.4" }, { name = "pytest", specifier = "==9.0.2" }, @@ -1403,7 +1366,7 @@ docs = [ ] linting = [ { name = "mypy", specifier = "==1.18.2" }, - { name = "pre-commit" }, + { name = "prek" }, { name = "pylint", specifier = "==4.0.4" }, { name = "ruff", specifier = "==0.15.1" }, ] @@ -1944,21 +1907,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/a7/c2/fe1e52489ae3122415c51f387e221dd0773709bad6c6cdaa599e8a2c5185/urllib3-2.5.0-py3-none-any.whl", hash = "sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc", size = 129795, upload-time = "2025-06-18T14:07:40.39Z" }, ] -[[package]] -name = "virtualenv" -version = "20.35.4" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "distlib" }, - { name = "filelock" }, - { name = "platformdirs" }, - { name = "typing-extensions", marker = "python_full_version < '3.11'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/20/28/e6f1a6f655d620846bd9df527390ecc26b3805a0c5989048c210e22c5ca9/virtualenv-20.35.4.tar.gz", hash = "sha256:643d3914d73d3eeb0c552cbb12d7e82adf0e504dbf86a3182f8771a153a1971c", size = 6028799, upload-time = "2025-10-29T06:57:40.511Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/79/0c/c05523fa3181fdf0c9c52a6ba91a23fbf3246cc095f26f6516f9c60e6771/virtualenv-20.35.4-py3-none-any.whl", hash = "sha256:c21c9cede36c9753eeade68ba7d523529f228a403463376cf821eaae2b650f1b", size = 6005095, upload-time = "2025-10-29T06:57:37.598Z" }, -] - [[package]] name = "zipp" version = "3.23.0" From 1f247941def9c7066ae5f385efe9629f83eb3809 Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Thu, 19 Feb 2026 11:46:22 -0500 Subject: [PATCH 2/7] Add prek github action runner --- .github/workflows/prek.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/prek.yml diff --git a/.github/workflows/prek.yml b/.github/workflows/prek.yml new file mode 100644 index 00000000000..fbfe6e63b1f --- /dev/null +++ b/.github/workflows/prek.yml @@ -0,0 +1,16 @@ +name: Prek checks + +on: + pull_request: + branches: + - '**' # Matches all branch names, for PRs + push: + branches: + - 'master' # Run tests on master branch + +jobs: + prek: + runs-on: ubuntu-slim + steps: + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 + - uses: j178/prek-action@v1 \ No newline at end of file From 5c2c878e63c5703faee34fc48a3e9525ae3b2457 Mon Sep 17 00:00:00 2001 From: harshil21 <37377066+harshil21@users.noreply.github.com> Date: Thu, 19 Feb 2026 16:49:44 +0000 Subject: [PATCH 3/7] Add chango fragment for PR #5142 --- changes/unreleased/5142.h7G2mCUQ2PobeTyLNewpvx.toml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changes/unreleased/5142.h7G2mCUQ2PobeTyLNewpvx.toml diff --git a/changes/unreleased/5142.h7G2mCUQ2PobeTyLNewpvx.toml b/changes/unreleased/5142.h7G2mCUQ2PobeTyLNewpvx.toml new file mode 100644 index 00000000000..cade904558f --- /dev/null +++ b/changes/unreleased/5142.h7G2mCUQ2PobeTyLNewpvx.toml @@ -0,0 +1,5 @@ +internal = "Replace `pre-commit` with `prek`" +[[pull_requests]] +uid = "5142" +author_uids = ["harshil21"] +closes_threads = ["5138"] From 41568b075c3a3e45f052fde67aadb27baee69643 Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Tue, 24 Feb 2026 14:08:47 -0500 Subject: [PATCH 4/7] Zizmor review: name, pinning, concurrency, credentials --- .github/workflows/prek.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prek.yml b/.github/workflows/prek.yml index fbfe6e63b1f..e4cefd8677f 100644 --- a/.github/workflows/prek.yml +++ b/.github/workflows/prek.yml @@ -1,4 +1,6 @@ name: Prek checks +permissions: + content: read on: pull_request: @@ -8,9 +10,17 @@ on: branches: - 'master' # Run tests on master branch +# Cancel any in-progress runs of this workflow for the same PR or branch when a new commit is pushed. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: prek: + name: prek runs-on: ubuntu-slim steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 - - uses: j178/prek-action@v1 \ No newline at end of file + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - uses: j178/prek-action@0bb87d7f00b0c99306c8bcb8b8beba1eb581c037 # v1.1.1 \ No newline at end of file From 9ff4250866890d3ef16eebb70746f5d535ab47c8 Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Tue, 24 Feb 2026 14:17:53 -0500 Subject: [PATCH 5/7] Add comment, fix typo --- .github/workflows/prek.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prek.yml b/.github/workflows/prek.yml index e4cefd8677f..52fbcfd175f 100644 --- a/.github/workflows/prek.yml +++ b/.github/workflows/prek.yml @@ -1,6 +1,6 @@ name: Prek checks permissions: - content: read + contents: read # Needed to see what files to run pre-commit on on: pull_request: From a1f377e8409caaad300be553e1817a7fcb3c7894 Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Sat, 7 Mar 2026 18:18:01 -0500 Subject: [PATCH 6/7] Review: update pre-commit references in CONTRIBUTING.rst --- .github/CONTRIBUTING.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CONTRIBUTING.rst b/.github/CONTRIBUTING.rst index db8a54bd371..cd6871452a2 100644 --- a/.github/CONTRIBUTING.rst +++ b/.github/CONTRIBUTING.rst @@ -37,7 +37,7 @@ Setting things up .. code-block:: bash - $ pre-commit install + $ prek install -f Finding something to do ======================= @@ -100,7 +100,7 @@ Here's how to make a one-off code change. .. code-block:: bash - $ pre-commit run -a + $ prek run -a - To actually make the commit (this will trigger tests style & type checks automatically): From 10b6c21c991c13793b3c90c83f0b130ada8cc827 Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Sat, 7 Mar 2026 18:48:29 -0500 Subject: [PATCH 7/7] Remove more pre-commit references and related labelling workflows --- .github/copilot-instructions.md | 2 +- .github/labeler.yml | 9 --------- .github/workflows/labelling.yml | 19 ------------------- README.rst | 4 ---- 4 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 .github/labeler.yml delete mode 100644 .github/workflows/labelling.yml diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 069c52f3afa..ff6596df489 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -32,7 +32,7 @@ The repository follows a standard structure for Python projects. Here are some k - Read the stability guide mentioned at docs/source/stability_policy.rst to understand if your changes are breaking or incompatible. - Try to make sure your code is asyncio-friendly and thread-safe. -- Run `uv run pre-commit` to run pre-commit hooks before committing your changes, but after `git add`ing them. +- Run `uv run prek` to run pre-commit hooks before committing your changes, but after `git add`ing them. - Make sure you always test your changes. Either update or write new tests in the `tests/` directory. ### Pull Requests: diff --git a/.github/labeler.yml b/.github/labeler.yml deleted file mode 100644 index 3d2eb437df9..00000000000 --- a/.github/labeler.yml +++ /dev/null @@ -1,9 +0,0 @@ -# Config file for workflows/labelling.yml - -version: 1 - -labels: -- label: "⚙️ dependencies" - authors: ["dependabot[bot]", "pre-commit-ci[bot]"] -- label: "🛠 code-quality" - authors: ["pre-commit-ci[bot]"] diff --git a/.github/workflows/labelling.yml b/.github/workflows/labelling.yml deleted file mode 100644 index 21a4d6733ba..00000000000 --- a/.github/workflows/labelling.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: PR Labeler - -on: - pull_request: - types: [opened] - -permissions: {} - -jobs: - pre-commit-ci: - permissions: - contents: read # for srvaroa/labeler to read config file - pull-requests: write # for srvaroa/labeler to add labels in PR - runs-on: ubuntu-latest - steps: - - uses: srvaroa/labeler@0a20eccb8c94a1ee0bed5f16859aece1c45c3e55 # v1.13.0 - # Config file at .github/labeler.yml - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/README.rst b/README.rst index 2a96b7112b9..22648c0cba7 100644 --- a/README.rst +++ b/README.rst @@ -43,10 +43,6 @@ :target: https://app.codacy.com/gh/python-telegram-bot/python-telegram-bot/dashboard :alt: Code quality: Codacy -.. image:: https://results.pre-commit.ci/badge/github/python-telegram-bot/python-telegram-bot/master.svg - :target: https://results.pre-commit.ci/latest/github/python-telegram-bot/python-telegram-bot/master - :alt: pre-commit.ci status - .. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/psf/black :alt: Code Style: Black