Created
April 15, 2022 15:06
-
-
Save adhadse/0068d5d2ee6c11f6c2c899d51c6de9dc to your computer and use it in GitHub Desktop.
Revisions
-
adhadse created this gist
Apr 15, 2022 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ #!/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}