Use python rather than relying on shell-specific syntax. Tested on bash and xonsh on macOS.

This commit is contained in:
Jason R. Coombs 2020-09-11 15:11:01 -04:00
parent 69762df708
commit 1b412a6e9f

View File

@ -11,7 +11,7 @@ For example::
tahoe-lafs $ pre-commit install
pre-commit installed at .git/hooks/pre-commit
tahoe-lafs $ echo "def foo():\n\t''" > src/allmydata/tabbed.py
tahoe-lafs $ python -c "import pathlib; pathlib.Path('src/allmydata/tabbed.py').write_text('def foo():\\n\\tpass\\n')"
tahoe-lafs $ git add src/allmydata/tabbed.py
tahoe-lafs $ git commit -a -m "Add a file that violates flake8"
flake8...................................................................Failed