##// END OF EJS Templates
Restore lineno's for Input mapped files (#13560)...
Restore lineno's for Input mapped files (#13560) * Implement lineno's for Input mapped files * Adopt In [123], line 123 format * Revert "Set co_name for cells run line by line. Fixes https://github.com/ipython/ipykernel/issues/841" (This reverts commit d11e987f174a15f1640f8006c86f58d884c3faa4.) * Omit mention of ", in <module>" for input tracebacks * Input cell -> Cell * Remove <module> from traceback doctests * Use f-string for `in ...' format * Simplify _format_list logic, converting to f-strings

File last commit:

r25464:108fec78
r27686:a72418e2
Show More
autoformat_file
46 lines | 934 B | text/plain | TextLexer
#!/bin/bash
set -ueo pipefail
FILE=$1
echo "will update $FILE"
echo $LINENO $?
pyupgrade --py36-plus --exit-zero-even-if-changed $FILE
echo $LINENO $?
git commit -am"Apply pyupgrade to $FILE
pyupgrade --py36-plus $FILE
To ignore those changes when using git blame see the content of
.git-blame-ignore-revs"
HASH=$(git rev-parse HEAD)
echo "$HASH # apply pyupgrade to $FILE" >> .git-blame-ignore-revs
git commit -am'Update .git-blame-ignore-revs with previous commit'
#####
black --target-version py36 $FILE
git commit -am"Apply black to $FILE
black --target-version py36 $FILE
To ignore those changes when using git blame see the content of
.git-blame-ignore-revs"
HASH=$(git rev-parse HEAD)
echo "$HASH # apply black to $FILE" >> .git-blame-ignore-revs
git commit -am'Update .git-blame-ignore-revs with previous commit'
echo
echo "Updating, reformatting and adding to .git-blame-ignore-revs successful"