21 Commits

Author SHA1 Message Date
8f6152921e drop python3.6 support
python 3.6 reached end of life on 2021-12-23

Committed via https://github.com/asottile/all-repos
2022-01-15 19:24:05 -05:00
f35bfed79e Don't use LocalPath.strpath 2020-05-20 12:08:42 -04:00
f5c42a050b pre-commit-hooks: python3.6+ 2020-02-05 11:22:18 -08:00
0114962a74 Added test for --markdown-linebreak-ext and --chars together 2019-10-25 12:28:50 -04:00
a2f836a23b fix-whitespace: Added test for custom charsets 2019-10-25 11:34:26 -04:00
99453a5366 Default --no-markdown-linebreak-ext for trailing-whitespace 2018-10-12 18:15:39 -07:00
38e02ff508 Don't add end-of-file newline while trimming whitespace 2018-02-28 08:43:07 -08:00
2a902e0a07 Use asottile/add-trailing-comma 2017-07-12 18:58:30 -07:00
81147337c5 Only return nonzero when rewriting whitespace 2017-02-07 09:45:31 -08:00
cb23c48b0d Post-review fixes 2016-08-31 11:44:59 +02:00
eaad923dd4 trailing-whitespace hook: Switching from using fileinput to a tempfile and whitespace substitution in binary mode 2016-08-20 11:59:10 +01:00
bc5e7f2d72 trailing-whitespace hook: restoring original file in case of failure - fixes #134 2016-08-19 18:26:33 +02:00
a99475afa0 Simplify the tests 2016-05-27 14:09:50 -07:00
f138e3451b Update hooks 2015-05-31 13:51:02 -07:00
a6023ac0d7 Implement Markdown trailing space line break preservation
Markdown uses two or more trailing spaces on a line to indicate a forced
line break `<br/>` - these will be preserved for files with a markdown
extension (default = `.md` or `.markdown`).

Add `--markdown-linebreak-ext=X,Y` to add extensions (`*` matches any),
and `--no-markdown-linebreak-ext` to disable this feature.

If you want to set specific extension `foo` only (and not md/markdown),
use `--no-markdown-linebreak-ext --markdown-linebreak-ext=foo`

Tries to prevent --markdown-linebreak-ext from eating filenames as if they were
extensions by rejecting any with '.' or '/' (or even Windows-style '\' or ':')

Update README.md to include information on these arguments as well as
arguments added to other hooks

Add extensive tests using pytest.mark.parametrize

test that `txt` file is not considered as 'txt' extension
test that `.txt` file is not considered as 'txt' extension

The latter is the (correct) behavior of os.path.splitext(), and an example
of why it is better to use the libraries than to mangle strings yourself.
2015-05-11 08:52:32 +02:00
713fab4bc7 Remove dependency on plumbum 2015-03-20 14:15:30 -07:00
2f1d2bbe5b Remove @entry decorator (and misc cleanup) 2015-01-04 11:08:53 -08:00
00d5904b80 Fix pylint. 2014-06-01 16:08:31 -07:00
ba80c884f8 Fix PyPy 2014-04-13 22:53:54 -07:00
8328f8f518 Fix Python2.6 coverage. 2014-04-13 22:31:47 -07:00
8270d81308 Improve test coverage. 2014-04-13 22:21:42 -07:00