Commit graph

2657 commits

Author SHA1 Message Date
helly25
0c1ea82b9c
Need to allow all OSError sub-types. 2024-04-25 12:47:07 +00:00
helly25
86fc829f4d
Need to also use an Exception parameter, not an OSError parameter. So we apply a cast for this to work. 2024-04-25 12:41:51 +00:00
helly25
9a3f2cbb99
One more attempt for util.py
The original `_handle_readonly` was flagged as not returning `object` even though the actual shutl.rmtree` does not use a return value.
So here we actually follow the requirements as seen by mymy iterally (which the local mymp in venv confirms to be correct).
2024-04-25 12:30:43 +00:00
helly25
6967f3cb5c
Update util in attempt to fix return type check everywhere. 2024-04-25 10:26:06 +00:00
helly25
839f7f2f04
_handle_readonly must take a last arg of type object - even if ignored 2024-04-25 09:45:20 +00:00
helly25
4c804052e0
Make formatting of the new code style compliant. 2024-04-25 09:33:59 +00:00
helly25
689f1203f7
When run is called with -v, then show hook.description if available.
When developers run the pre-commit, they don't always understand what to or where to find more information. The hook description field is already present and often used to provide more descriptive information. For brevity this is not shown in normal cases, but this PR changes the tool behavior to show the description in verbose mode (`-v`). So most users won't see any difference but this can easily be enabled for people who want it.

Alternatives considered:
* Always show the description: Some people may not like this though as it can be spammy.
* Provide a new field: Possible but seems to be just more work with description already present and not otherwise used.
* Show the `repo` link. This is at the wrong level and has a slightly different purpose. Though description can just be set to the same url where that is correct.
2024-04-25 09:10:44 +00:00
Anthony Sottile
85fe18253f
Merge pull request #3176 from pre-commit/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-04-10 11:20:08 -04:00
pre-commit-ci[bot]
74d05b444d
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v4.6.0)
2024-04-08 22:08:29 +00:00
Anthony Sottile
a9f19f4cc0
Merge pull request #3169 from pre-commit/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-03-27 17:20:38 -04:00
pre-commit-ci[bot]
4e121ef25c
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v3.15.1 → v3.15.2](https://github.com/asottile/pyupgrade/compare/v3.15.1...v3.15.2)
2024-03-25 21:31:39 +00:00
Anthony Sottile
7b4667e9e6 v3.7.0 2024-03-24 13:37:19 -04:00
Anthony Sottile
d46c8fc051
Merge pull request #3168 from pre-commit/fix-fail-fast
fix per-hook fail_fast to not fail on previous failures
2024-03-24 13:28:36 -04:00
Anthony Sottile
fc622159a6 fix per-hook fail_fast to not fail on previous failures 2024-03-24 13:17:00 -04:00
Anthony Sottile
716da1e49c
Merge pull request #3155 from pre-commit/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-03-20 09:29:19 -04:00
pre-commit-ci[bot]
0939c11b4f
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/hhatto/autopep8: v2.0.4 → v2.1.0](https://github.com/hhatto/autopep8/compare/v2.0.4...v2.1.0)
2024-03-18 21:47:27 +00:00
Anthony Sottile
3bdf9fb91b
Merge pull request #3150 from pre-commit/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-03-13 10:01:23 -04:00
pre-commit-ci[bot]
75b3e52e57
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.8.0...v1.9.0)
2024-03-13 00:16:12 +00:00
Anthony Sottile
5e11c266ae
Merge pull request #3122 from glehmann/docker-tty
give docker a tty output when expecting color
2024-03-02 11:57:30 -05:00
Gaëtan Lehmann
e58009684c give docker a tty output when expecting color
this makes the behavior more consistent with the system language
and would help the executable run in a docker container to
produce a colored output.
2024-03-02 11:51:34 -05:00
Anthony Sottile
7b868c3508
Merge pull request #3132 from pre-commit/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-02-20 10:21:58 -05:00
pre-commit-ci[bot]
a768c038e3
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v3.15.0 → v3.15.1](https://github.com/asottile/pyupgrade/compare/v3.15.0...v3.15.1)
2024-02-20 00:02:29 +00:00
Anthony Sottile
e525726855 v3.6.2 2024-02-18 13:19:11 -05:00
Anthony Sottile
3187538d2b
Merge pull request #3130 from pre-commit/golang-build-during-commit-a
fix building golang hooks during `commit --all`
2024-02-18 13:14:37 -05:00
Anthony Sottile
61d9c95cc1 fix building golang hooks during commit --all 2024-02-18 13:03:44 -05:00
Anthony Sottile
15bd0c7993 v3.6.1 2024-02-10 14:45:43 -05:00
Anthony Sottile
92678c3fa2
Merge pull request #3126 from pre-commit/crlf-only-diff
staged_files_only can handle a crlf-only diff
2024-02-10 14:10:29 -05:00
Anthony Sottile
032d8e2704 staged_files_only can handle a crlf-only diff 2024-02-10 14:01:49 -05:00
Anthony Sottile
73848383f2
Merge pull request #3110 from untitaker/pythonexecutable
Pop PYTHONEXECUTABLE
2024-01-12 11:39:51 -05:00
pre-commit-ci[bot]
96e0712f43 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-01-12 16:32:44 +00:00
Markus Unterwaditzer
3388e2dbdf Pop PYTHONEXECUTABLE 2024-01-12 17:30:01 +01:00
Anthony Sottile
10f8853631
Merge pull request #3107 from pre-commit/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-01-08 17:41:12 -05:00
pre-commit-ci[bot]
9682f93e31
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/PyCQA/flake8: 6.1.0 → 7.0.0](https://github.com/PyCQA/flake8/compare/6.1.0...7.0.0)
2024-01-08 20:21:06 +00:00
Anthony Sottile
5f8ebaefa9
Merge pull request #3102 from pre-commit/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-12-26 13:50:45 -05:00
pre-commit-ci[bot]
9cce283422
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/mirrors-mypy: v1.7.1 → v1.8.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.7.1...v1.8.0)
2023-12-25 20:20:03 +00:00
Anthony Sottile
9c9983dba0 v3.6.0 2023-12-09 16:24:52 -05:00
Anthony Sottile
7dc0a59ee5
Merge pull request #3093 from pre-commit/removeprefix
python 3.9+: use removeprefix
2023-12-09 16:13:25 -05:00
Anthony Sottile
d3fa7f415c
Merge pull request #3092 from pre-commit/minimum-version-first
attempt minimum_pre_commit_version first when parsing configs
2023-12-09 16:04:44 -05:00
Anthony Sottile
08478ec176 python 3.9+: use removeprefix 2023-12-09 16:04:25 -05:00
Anthony Sottile
047439abff attempt minimum_pre_commit_version first when parsing configs 2023-12-09 15:34:16 -05:00
Anthony Sottile
23a2b7360e
Merge pull request #3079 from edgarrmondragon/deprecation-rmtree-onerror
Address deprecation warning in `shutil.rmtree(onerror=...)`
2023-12-09 14:59:09 -05:00
Edgar Ramírez Mondragón
cffabe54be Address deprecation warning in shutil.rmtree(onerror=...) 2023-12-09 14:51:01 -05:00
Anthony Sottile
51df34e5fb
Merge pull request #3078 from pre-commit/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-11-27 17:55:04 -05:00
pre-commit-ci[bot]
e36cefc8bd
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/mirrors-mypy: v1.7.0 → v1.7.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.7.0...v1.7.1)
2023-11-27 20:01:19 +00:00
Anthony Sottile
2280645d0e
Merge pull request #3064 from pre-commit/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-11-13 21:41:08 -05:00
pre-commit-ci[bot]
1d474994e0
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/mirrors-mypy: v1.6.1 → v1.7.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.6.1...v1.7.0)
2023-11-13 20:35:35 +00:00
Anthony Sottile
14169eb31d
Merge pull request #3043 from pre-commit/jaraco
3.13 removed the simpler importlib.resources api
2023-10-28 14:50:43 -04:00
Anthony Sottile
75f2710bd4 3.13 removed the simpler importlib.resources api 2023-10-28 14:39:49 -04:00
Anthony Sottile
762e68173b
Merge pull request #3042 from pre-commit/py39
python3.9+
2023-10-28 14:35:26 -04:00
Anthony Sottile
7f15dc75ee python3.9+ 2023-10-28 14:20:37 -04:00