Commit graph

737 commits

Author SHA1 Message Date
Youngmin Koo
1f8151aeeb Add --additional-github-domain to check-vcs-permalinks 2020-11-18 08:58:23 -08:00
Anthony Sottile
2323ac0558
Merge pull request #529 from pre-commit/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2020-11-16 10:44:21 -08:00
Anthony Sottile
64d3fbd5cf fix mypy by correcting the __lt__ annotation 2020-11-16 10:41:32 -08:00
pre-commit-ci[bot]
e90998353b [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2020-11-16 17:05:15 +00:00
pre-commit-ci[bot]
29fc56c40c [pre-commit.ci] pre-commit autoupdate 2020-11-16 17:04:49 +00:00
Anthony Sottile
75ade3bf9b
Merge pull request #525 from pre-commit/pci
use pre-commit.ci
2020-10-29 11:42:11 -07:00
Anthony Sottile
7d9c32e9a0 use pre-commit.ci 2020-10-29 11:38:19 -07:00
Anthony Sottile
8bb0054677
Merge pull request #524 from danielhoherd/sort-unique
Add --unique arg to file_contents_sorter
2020-10-25 12:26:47 -07:00
Daniel Hoherd
7e393476bd Add --unique arg to file-contents-sorter 2020-10-25 12:18:09 -07:00
Anthony Sottile
9136088a24 v3.3.0 2020-10-20 10:17:01 -07:00
Anthony Sottile
08d19018ce
Merge pull request #522 from jgowdy/byte-order-marker-fix
Attempt to add fixing of BOMs
2020-10-11 11:35:09 -07:00
Jeremiah Gowdy
d18bd5b75f Add new byte-order-marker checker/fixer 2020-10-11 11:31:05 -07:00
Anthony Sottile
5bd9e74adf
Merge pull request #519 from mshawcroft/fix-518
Fix #518, provide --enforce-all option to check_added_large_files
2020-09-27 15:25:47 -07:00
Marcus Shawcroft
012bb0691f Fix #518, provide --enforce-all option to check_added_large_files
The --enforce-all option when provided ensures that all files passed
on the command line are checked against the size limit.  Default
behaviour remains unchanged.
2020-09-27 15:15:37 -07:00
Anthony Sottile
31d41ff291
Merge pull request #514 from Julian/case-insensitive-sorting
Add a way to do case-insensitive sorting via file-contents-sorter.
2020-08-26 18:59:21 -07:00
Julian Berman
0c760253f3 Add a way to do case-insensitive sorting via file-contents-sorter. 2020-08-26 21:55:22 -04:00
Anthony Sottile
e1668fe86a v3.2.0 2020-07-30 13:33:26 -07:00
Anthony Sottile
9eab799c5a
Merge pull request #509 from pawamoy/patch-1
Fix parsing of git output with unusual characters
2020-07-30 12:03:39 -07:00
Timothée Mazzucotelli
4faed34fbc Fix parsing of git output with unusual characters
On Windows, all files are "executable".
Therefore, to know if a file is supposed to be executed,
we check how its attributes were recorded by git:
we run a `git ls-files` command in a subprocess.

By default, this command outputs information
on multiple lines (file and their data separated by newlines).
When a file contains an unusual character,
the character is escaped with an integer sequence
(such as `\303\261`), and git wraps the whole filename
in double-quotes because of the backslashes.
It breaks the current code because we try to open
the filename containing the double-quotes:
it doesn't exist, of course.

Instead of trying to fix this special case by removing
the double-quotes, and breaking other cases
(a double-quote is a valid filename character on Linux),
we tell git to separate each item with the null character `\0`
instead of a new line `\n`, with the option `-z`.
With this option, git doesn't escape unusual characters
with integer sequence, so the output is fixed, and we
parse it by splitting on `\0` instead of `\n`.

Fixes #508.
2020-07-30 11:58:24 -07:00
Anthony Sottile
5372f44b85
Merge pull request #502 from jgeerds/feature/catch-pydevd-pycharm-debug-statement
debug-statements: Add "pydevd_pycharm" to list of debug statements
2020-07-01 17:03:04 -07:00
Jascha Geerds
53a05b952c Add "pydevd_pycharm" to list of debug statements 2020-07-01 17:15:46 +02:00
Anthony Sottile
f7dd0c05bd
Merge pull request #501 from marcjay/document-no-commit-to-branch-always-run
Document the default always_run behaviour of no-commit-to-branch
2020-06-19 13:31:37 -07:00
Marc Jay
b4694348b0 Document the default always_run behaviour of no-commit-to-branch
Include instructions on how to use files/types/excludes/exclude_types
with the no-commit-to-branch hook, along with the caveat of it allowing
empty commits
2020-06-19 18:39:45 +01:00
Anthony Sottile
c14b3aa54f sed -i s/whitelist/allowlist/g 2020-06-17 08:27:11 -07:00
Anthony Sottile
f0bf512dbb
Merge pull request #491 from pre-commit/all-repos_autofix_faster-tests
slightly speed up tests by avoiding pre-commit install
2020-05-26 22:07:40 -07:00
Anthony Sottile
1da4a7f296 slightly speed up tests by avoiding pre-commit install
Committed via https://github.com/asottile/all-repos
2020-05-26 21:53:22 -07:00
Anthony Sottile
0e509ddcbc
Merge pull request #488 from mxr/strpath
Don't use LocalPath.strpath
2020-05-20 10:32:27 -07:00
Anthony Sottile
ebc15added v3.1.0 2020-05-20 09:11:02 -07:00
Max Rozentsveyg
f35bfed79e Don't use LocalPath.strpath 2020-05-20 12:08:42 -04:00
Anthony Sottile
e37b2795ff
Merge pull request #487 from pedrocalleja/master
hotfix: the user may be define an extra arguments for a removed hook
2020-05-18 20:01:29 -07:00
Pedro Calleja
926208fb31 hotfix: the user may be define an extra arguments for a removed hook 2020-05-18 19:57:49 -07:00
Anthony Sottile
37d0e19fd8
Merge pull request #486 from mxr/patch-1
Fix typo
2020-05-18 18:47:48 -07:00
Max R
7848fcff22
Fix typo 2020-05-18 21:46:53 -04:00
Anthony Sottile
e75e18033d
Merge pull request #484 from mxr/flake8-comprehensions
Fix C407
2020-05-18 16:19:13 -07:00
Anthony Sottile
e0c9d513c3
Merge pull request #483 from mxr/parse-reqs
Parse more operators in requirements
2020-05-18 16:15:10 -07:00
Anthony Sottile
ad928f6775
Merge pull request #480 from mxr/git-file-mode
Check git mode on Windows
2020-05-18 16:15:03 -07:00
Max Rozentsveyg
5195ba3449 Check git mode on Windows 2020-05-18 16:11:10 -07:00
Max Rozentsveyg
c8d9fb183f Fix C407 2020-05-18 17:34:38 -04:00
Max Rozentsveyg
7ebd420417 Parse more operators in requirements 2020-05-18 17:25:48 -04:00
Anthony Sottile
3d379a962d
Merge pull request #481 from mxr/rm-type-ignore
Remove `type: ignore`
2020-05-16 19:26:32 -07:00
Max Rozentsveyg
c03ac576a3 Remove type: ignore 2020-05-16 22:21:03 -04:00
Anthony Sottile
0e2c0f7502 v3.0.1 2020-05-16 18:08:51 -07:00
Anthony Sottile
ddf5e94f88
Merge pull request #479 from mxr/fix-encoding
Support checking unicode TOML
2020-05-16 18:07:12 -07:00
Max Rozentsveyg
8febacdfed Support checking unicode TOML 2020-05-16 21:05:37 -04:00
Anthony Sottile
2322277afd
Merge pull request #478 from pre-commit/remove_todo
check-json: resolve TODO
2020-05-14 16:35:24 -07:00
Anthony Sottile
c11c5483d6 check-json: resolve TODO 2020-05-14 16:29:55 -07:00
Anthony Sottile
66250ba9bf v3.0.0 2020-05-14 16:24:40 -07:00
Anthony Sottile
2e9347f00b
Merge pull request #477 from pre-commit/remove_flake8_more
Remove additional remnants of flake8
2020-05-14 16:19:25 -07:00
Anthony Sottile
e6d9355bf1 Remove additional remnants of flake8 2020-05-14 16:16:09 -07:00
Anthony Sottile
b3f3c34516
Merge pull request #476 from pre-commit/remove_flake8
remove flake8 and suggest pycqa/flake8
2020-05-14 16:10:26 -07:00