#!/usr/bin/env bash | |
# Copyright 2021 The Fuchsia Authors. All rights reserved. | |
# Use of this source code is governed by a BSD-style license that can be | |
# found in the LICENSE file. | |
# Wrapper around the Black Python formatter. | |
# | |
# Only valid when run within a constructed CIPD package. | |
set -eu -o pipefail | |
black_dir="$(dirname "${BASH_SOURCE[0]}")" | |
python="${black_dir}/bin/python3.9" | |
export PYTHONPATH="${black_dir}/lib/python3.9/site-packages" | |
"$python" -m black "$@" |