Created
April 15, 2022 15:06
-
-
Save adhadse/0068d5d2ee6c11f6c2c899d51c6de9dc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
base_dir=$(dirname $(dirname $0)) | |
target_dir="${base_dir}/examples/ ${base_dir}/keras_nlp/" | |
targets="${base_dir}/*.py ${base_dir}/examples/ ${base_dir}/keras_nlp/" | |
isort --sp "${base_dir}/setup.cfg" --sl ${targets} | |
black --line-length 80 ${targets} | |
for i in $(find ${target_dir} -name '*.py'); do | |
if ! grep -q Copyright $i; then | |
echo $i | |
cat shell/copyright.txt $i >$i.new && mv $i.new $i | |
fi | |
done | |
flake8 --config "${base_dir}/setup.cfg" ${targets} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment