Skip to content
2 changes: 2 additions & 0 deletions .style.yapf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[style]
based_on_style = google
Comment thread
mhucka marked this conversation as resolved.
3 changes: 1 addition & 2 deletions scripts/format_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
# limitations under the License.
# ==============================================================================
echo "Doing python language formatting..."
python3 -m yapf --style=google --in-place --recursive --parallel \
./benchmarks ./scripts ./tensorflow_quantum
python3 -m yapf --in-place --recursive ./benchmarks ./tensorflow_quantum ./scripts
echo -e "Done! \nDoing notebook formatting..."
python3 ./scripts/format_ipynb.py
echo -e "Done! \nDoing C++ formatting..."
Expand Down
2 changes: 1 addition & 1 deletion scripts/format_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ for changed_file in ${changed_files}; do
)
if [[ "${changed_line_ranges}" != "--lines=0-0 " ]]; then
# Do the formatting.
results=$(yapf --style=google --diff "${changed_file}" ${changed_line_ranges})
results=$(python3 -m yapf --diff "${changed_file}" ${changed_line_ranges})

# Print colorized error messages.
if [ ! -z "${results}" ]; then
Expand Down
Loading