Skip to content

Commit 4607dd1

Browse files
authored
Remove outdated workaround for a bug in black formatter (#6045)
The bug appears to be fixed in our required version of black per psf/black#1629
1 parent cc8fc31 commit 4607dd1

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

check/format-incremental

+1-9
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,8 @@ if (( only_print == 1 )); then
112112
args+=("--check" "--diff")
113113
fi
114114

115-
# Warn users about bug in black: https://github.com/psf/black/issues/1629
116-
# Once that is fixed upstream, we can just do:
117-
# black "${args[@]}" "${format_files[@]}"
118-
# exit $?
119-
LOGS="$(black "${args[@]}" "${format_files[@]}" 2>&1)"
115+
black "${args[@]}" "${format_files[@]}"
120116
BLACKSTATUS=$?
121-
echo "${LOGS}"
122-
if [[ "$BLACKSTATUS" == "123" && "$LOGS" =~ ^.*"INTERNAL ERROR: Black produced different code on the second pass of the formatter.".*$ ]]; then
123-
echo -e "\033[31mWarning, it seems we ran into https://github.com/psf/black/issues/1629. Typically, this can be fixed by adding a trailing comma. If you get stuck, please file a cirq issue on github.\033[0m"
124-
fi
125117

126118
if [[ "$FLYNTSTATUS" != "0" || "$BLACKSTATUS" != "0" ]]; then
127119
exit 1

0 commit comments

Comments
 (0)