Created
April 15, 2022 15:12
-
-
Save adhadse/03967a1069f8ef18d6fd8b7ca49a918a 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