Add pyupgrade check outdated-version-block (UP036) (#11509)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Avasam
2024-03-01 10:15:53 -05:00
committed by GitHub
parent 2116158891
commit 88238202d7
68 changed files with 68 additions and 395 deletions

View File

@@ -74,6 +74,7 @@ PROTO_FILES=$(grep "GenProto.*google" $PYTHON_PROTOBUF_DIR/python/setup.py | \
protoc_install/bin/protoc --proto_path="$PYTHON_PROTOBUF_DIR/src" --mypy_out="relax_strict_optional_primitives:$REPO_ROOT/stubs/protobuf" $PROTO_FILES
ruff check "$REPO_ROOT/stubs/protobuf" --fix-only
ruff check "$REPO_ROOT/stubs/protobuf" --fix-only --select=UP036 --unsafe-fixes
black "$REPO_ROOT/stubs/protobuf"
sed --in-place="" \

View File

@@ -62,6 +62,7 @@ rm tensorflow/compiler/xla/service/hlo_execution_profile_data_pb2.pyi \
tensorflow/core/util/example_proto_fast_parsing_test_pb2.pyi
ruff check "$REPO_ROOT/stubs/tensorflow/tensorflow" --fix-only
ruff check "$REPO_ROOT/stubs/protobuf" --fix-only --select=UP036 --unsafe-fixes
black "$REPO_ROOT/stubs/tensorflow/tensorflow"
sed --in-place="" \