This is an automated email from the ASF dual-hosted git repository. mwalenia pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/beam.git.
from 041f7af Merge pull request #8774 from je-ik/requires-time-sorted-input-draft: [BEAM-8550] Requires time sorted input new 1576276 [BEAM-9175] Add yapf autoformatter new 9c3941f [BEAM-9175] Yapf everywhere! new d76596c [BEAM-9175] Fix pylint issues new f7069f8 [BEAM-9175] Add pre-commit Jenkins job new 4fa102c [BEAM-9175] Disable bad-continuation check in pylint new b91560c Merge pull request #10684 from kamilwu/yapf The 25449 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: ...vy => job_PreCommit_PythonAutoformatter.groovy} | 8 +- build.gradle | 4 + sdks/python/.pylintrc | 1 + .../setup.sh => sdks/python/.yapfignore | 12 +- sdks/python/apache_beam/__init__.py | 6 +- sdks/python/apache_beam/coders/avro_record.py | 6 +- sdks/python/apache_beam/coders/coder_impl.py | 110 +- sdks/python/apache_beam/coders/coders.py | 227 ++-- sdks/python/apache_beam/coders/coders_test.py | 34 +- .../apache_beam/coders/coders_test_common.py | 325 +++--- sdks/python/apache_beam/coders/fast_coders_test.py | 2 - sdks/python/apache_beam/coders/observable.py | 2 - sdks/python/apache_beam/coders/observable_test.py | 1 - sdks/python/apache_beam/coders/row_coder.py | 22 +- sdks/python/apache_beam/coders/row_coder_test.py | 53 +- sdks/python/apache_beam/coders/slow_coders_test.py | 2 - sdks/python/apache_beam/coders/slow_stream.py | 5 +- .../apache_beam/coders/standard_coders_test.py | 100 +- sdks/python/apache_beam/coders/stream_test.py | 17 +- sdks/python/apache_beam/coders/typecoders.py | 41 +- sdks/python/apache_beam/coders/typecoders_test.py | 38 +- sdks/python/apache_beam/examples/avro_bitcoin.py | 72 +- .../apache_beam/examples/complete/autocomplete.py | 33 +- .../examples/complete/autocomplete_test.py | 16 +- .../apache_beam/examples/complete/distribopt.py | 89 +- .../examples/complete/distribopt_test.py | 22 +- .../apache_beam/examples/complete/estimate_pi.py | 24 +- .../examples/complete/estimate_pi_test.py | 2 +- .../examples/complete/game/game_stats.py | 196 ++-- .../examples/complete/game/game_stats_it_test.py | 54 +- .../examples/complete/game/game_stats_test.py | 4 +- .../examples/complete/game/hourly_team_score.py | 122 +- .../complete/game/hourly_team_score_it_test.py | 30 +- .../complete/game/hourly_team_score_test.py | 17 +- .../examples/complete/game/leader_board.py | 118 +- .../examples/complete/game/leader_board_it_test.py | 75 +- .../examples/complete/game/leader_board_test.py | 10 +- .../examples/complete/game/user_score.py | 41 +- .../examples/complete/game/user_score_it_test.py | 21 +- .../examples/complete/game/user_score_test.py | 7 +- .../complete/juliaset/juliaset/juliaset.py | 39 +- .../complete/juliaset/juliaset/juliaset_test.py | 1 - .../examples/complete/juliaset/setup.py | 14 +- sdks/python/apache_beam/examples/complete/tfidf.py | 27 +- .../apache_beam/examples/complete/tfidf_test.py | 35 +- .../examples/complete/top_wikipedia_sessions.py | 70 +- .../complete/top_wikipedia_sessions_test.py | 38 +- .../examples/cookbook/bigquery_schema.py | 30 +- .../examples/cookbook/bigquery_side_input.py | 26 +- .../examples/cookbook/bigquery_side_input_test.py | 34 +- .../examples/cookbook/bigquery_tornadoes.py | 42 +- .../cookbook/bigquery_tornadoes_it_test.py | 19 +- .../examples/cookbook/bigquery_tornadoes_test.py | 25 +- .../examples/cookbook/bigtableio_it_test.py | 65 +- .../python/apache_beam/examples/cookbook/coders.py | 21 +- .../apache_beam/examples/cookbook/coders_test.py | 22 +- .../examples/cookbook/combiners_test.py | 3 +- .../examples/cookbook/custom_ptransform.py | 31 +- .../examples/cookbook/custom_ptransform_test.py | 1 - .../examples/cookbook/datastore_wordcount.py | 106 +- .../cookbook/datastore_wordcount_it_test.py | 41 +- .../apache_beam/examples/cookbook/filters.py | 35 +- .../apache_beam/examples/cookbook/filters_test.py | 29 +- .../examples/cookbook/group_with_coder.py | 43 +- .../examples/cookbook/group_with_coder_test.py | 27 +- .../apache_beam/examples/cookbook/mergecontacts.py | 57 +- .../examples/cookbook/mergecontacts_test.py | 170 +-- .../examples/cookbook/multiple_output_pardo.py | 71 +- .../cookbook/multiple_output_pardo_test.py | 7 +- .../apache_beam/examples/fastavro_it_test.py | 17 +- .../examples/flink/flink_streaming_impulse.py | 55 +- .../apache_beam/examples/snippets/snippets.py | 398 ++++--- .../apache_beam/examples/snippets/snippets_test.py | 443 ++++---- .../transforms/aggregation/cogroupbykey.py | 10 +- .../transforms/aggregation/cogroupbykey_test.py | 1 + .../transforms/aggregation/combineglobally.py | 25 +- .../transforms/aggregation/combineglobally_test.py | 20 +- .../transforms/aggregation/combineperkey.py | 41 +- .../transforms/aggregation/combinevalues.py | 43 +- .../snippets/transforms/aggregation/count.py | 17 +- .../snippets/transforms/aggregation/distinct.py | 3 +- .../snippets/transforms/aggregation/groupbykey.py | 3 +- .../snippets/transforms/aggregation/latest.py | 70 +- .../snippets/transforms/aggregation/max.py | 10 +- .../snippets/transforms/aggregation/mean.py | 6 +- .../snippets/transforms/aggregation/min.py | 10 +- .../snippets/transforms/aggregation/sample.py | 6 +- .../snippets/transforms/aggregation/sum.py | 6 +- .../snippets/transforms/aggregation/top.py | 12 +- .../snippets/transforms/aggregation/top_test.py | 7 +- .../snippets/transforms/elementwise/filter.py | 151 ++- .../snippets/transforms/elementwise/flatmap.py | 70 +- .../snippets/transforms/elementwise/keys.py | 3 +- .../snippets/transforms/elementwise/kvswap.py | 3 +- .../snippets/transforms/elementwise/map.py | 54 +- .../snippets/transforms/elementwise/pardo.py | 31 +- .../snippets/transforms/elementwise/pardo_test.py | 8 +- .../snippets/transforms/elementwise/partition.py | 14 +- .../transforms/elementwise/partition_test.py | 15 +- .../snippets/transforms/elementwise/regex.py | 27 +- .../snippets/transforms/elementwise/tostring.py | 9 +- .../snippets/transforms/elementwise/values.py | 3 +- .../apache_beam/examples/snippets/util_test.py | 35 +- .../apache_beam/examples/streaming_wordcount.py | 58 +- .../examples/streaming_wordcount_debugging.py | 58 +- .../examples/streaming_wordcount_it_test.py | 28 +- .../apache_beam/examples/windowed_wordcount.py | 43 +- sdks/python/apache_beam/examples/wordcount.py | 36 +- .../apache_beam/examples/wordcount_debugging.py | 42 +- .../examples/wordcount_debugging_test.py | 3 +- .../apache_beam/examples/wordcount_it_test.py | 26 +- .../apache_beam/examples/wordcount_minimal.py | 27 +- .../apache_beam/examples/wordcount_minimal_test.py | 3 +- sdks/python/apache_beam/examples/wordcount_test.py | 6 +- .../python/apache_beam/examples/wordcount_xlang.py | 46 +- sdks/python/apache_beam/internal/gcp/auth.py | 16 +- sdks/python/apache_beam/internal/gcp/json_value.py | 3 +- .../apache_beam/internal/gcp/json_value_test.py | 1 - sdks/python/apache_beam/internal/http_client.py | 9 +- .../apache_beam/internal/http_client_test.py | 3 +- sdks/python/apache_beam/internal/module_test.py | 11 +- sdks/python/apache_beam/internal/pickler.py | 47 +- sdks/python/apache_beam/internal/pickler_test.py | 36 +- sdks/python/apache_beam/internal/util.py | 13 +- sdks/python/apache_beam/internal/util_test.py | 1 - sdks/python/apache_beam/io/__init__.py | 1 + sdks/python/apache_beam/io/avroio.py | 145 +-- sdks/python/apache_beam/io/avroio_test.py | 151 ++- .../apache_beam/io/aws/clients/s3/boto3_client.py | 83 +- .../apache_beam/io/aws/clients/s3/client_test.py | 116 +- .../apache_beam/io/aws/clients/s3/fake_client.py | 27 +- .../apache_beam/io/aws/clients/s3/messages.py | 16 +- sdks/python/apache_beam/io/aws/s3filesystem.py | 33 +- .../python/apache_beam/io/aws/s3filesystem_test.py | 81 +- sdks/python/apache_beam/io/aws/s3io.py | 95 +- sdks/python/apache_beam/io/aws/s3io_test.py | 86 +- sdks/python/apache_beam/io/concat_source.py | 45 +- sdks/python/apache_beam/io/concat_source_test.py | 124 +- sdks/python/apache_beam/io/external/gcp/pubsub.py | 32 +- .../apache_beam/io/external/generate_sequence.py | 24 +- .../io/external/generate_sequence_test.py | 4 +- sdks/python/apache_beam/io/external/kafka.py | 43 +- .../io/external/xlang_parquetio_test.py | 4 +- sdks/python/apache_beam/io/filebasedsink.py | 148 ++- sdks/python/apache_beam/io/filebasedsink_test.py | 65 +- sdks/python/apache_beam/io/filebasedsource.py | 106 +- sdks/python/apache_beam/io/filebasedsource_test.py | 206 ++-- sdks/python/apache_beam/io/fileio.py | 302 +++-- sdks/python/apache_beam/io/fileio_test.py | 566 ++++----- sdks/python/apache_beam/io/filesystem.py | 98 +- sdks/python/apache_beam/io/filesystem_test.py | 229 ++-- sdks/python/apache_beam/io/filesystemio.py | 25 +- sdks/python/apache_beam/io/filesystemio_test.py | 14 +- sdks/python/apache_beam/io/filesystems.py | 32 +- sdks/python/apache_beam/io/filesystems_test.py | 47 +- .../io/gcp/big_query_query_to_table_it_test.py | 174 +-- .../io/gcp/big_query_query_to_table_pipeline.py | 55 +- sdks/python/apache_beam/io/gcp/bigquery.py | 432 ++++--- .../apache_beam/io/gcp/bigquery_file_loads.py | 282 ++--- .../apache_beam/io/gcp/bigquery_file_loads_test.py | 451 ++++---- .../apache_beam/io/gcp/bigquery_io_read_it_test.py | 31 +- .../io/gcp/bigquery_io_read_pipeline.py | 44 +- .../apache_beam/io/gcp/bigquery_read_it_test.py | 96 +- .../apache_beam/io/gcp/bigquery_read_perf_test.py | 35 +- sdks/python/apache_beam/io/gcp/bigquery_test.py | 477 ++++---- sdks/python/apache_beam/io/gcp/bigquery_tools.py | 345 +++--- .../apache_beam/io/gcp/bigquery_tools_test.py | 347 +++--- .../apache_beam/io/gcp/bigquery_write_it_test.py | 249 ++-- .../apache_beam/io/gcp/bigquery_write_perf_test.py | 28 +- sdks/python/apache_beam/io/gcp/bigtableio.py | 46 +- .../io/gcp/datastore/v1/adaptive_throttler.py | 4 +- .../io/gcp/datastore/v1/adaptive_throttler_test.py | 50 +- .../apache_beam/io/gcp/datastore/v1/datastoreio.py | 129 ++- .../io/gcp/datastore/v1/datastoreio_test.py | 89 +- .../io/gcp/datastore/v1/fake_datastore.py | 2 +- .../apache_beam/io/gcp/datastore/v1/helper.py | 55 +- .../apache_beam/io/gcp/datastore/v1/helper_test.py | 30 +- .../io/gcp/datastore/v1/query_splitter.py | 11 +- .../io/gcp/datastore/v1/query_splitter_test.py | 27 +- .../python/apache_beam/io/gcp/datastore/v1/util.py | 26 +- .../apache_beam/io/gcp/datastore/v1/util_test.py | 27 +- .../datastore/v1new/datastore_write_it_pipeline.py | 57 +- .../gcp/datastore/v1new/datastore_write_it_test.py | 16 +- .../io/gcp/datastore/v1new/datastoreio.py | 96 +- .../io/gcp/datastore/v1new/datastoreio_test.py | 75 +- .../apache_beam/io/gcp/datastore/v1new/helper.py | 10 +- .../io/gcp/datastore/v1new/query_splitter.py | 13 +- .../io/gcp/datastore/v1new/query_splitter_test.py | 41 +- .../apache_beam/io/gcp/datastore/v1new/types.py | 85 +- .../io/gcp/datastore/v1new/types_test.py | 38 +- .../io/gcp/datastore_write_it_pipeline.py | 71 +- .../apache_beam/io/gcp/datastore_write_it_test.py | 24 +- .../apache_beam/io/gcp/experimental/spannerio.py | 214 ++-- .../io/gcp/experimental/spannerio_test.py | 354 +++--- sdks/python/apache_beam/io/gcp/gcsfilesystem.py | 35 +- .../apache_beam/io/gcp/gcsfilesystem_test.py | 96 +- sdks/python/apache_beam/io/gcp/gcsio.py | 94 +- .../apache_beam/io/gcp/gcsio_integration_test.py | 48 +- sdks/python/apache_beam/io/gcp/gcsio_overrides.py | 6 +- sdks/python/apache_beam/io/gcp/gcsio_test.py | 107 +- sdks/python/apache_beam/io/gcp/pubsub.py | 77 +- .../apache_beam/io/gcp/pubsub_integration_test.py | 92 +- .../apache_beam/io/gcp/pubsub_it_pipeline.py | 30 +- sdks/python/apache_beam/io/gcp/pubsub_test.py | 313 ++--- .../apache_beam/io/gcp/tests/bigquery_matcher.py | 47 +- .../io/gcp/tests/bigquery_matcher_test.py | 33 +- .../apache_beam/io/gcp/tests/pubsub_matcher.py | 57 +- .../io/gcp/tests/pubsub_matcher_test.py | 71 +- sdks/python/apache_beam/io/gcp/tests/utils.py | 51 +- sdks/python/apache_beam/io/gcp/tests/utils_test.py | 30 +- sdks/python/apache_beam/io/hadoopfilesystem.py | 66 +- .../python/apache_beam/io/hadoopfilesystem_test.py | 86 +- sdks/python/apache_beam/io/iobase.py | 204 ++-- sdks/python/apache_beam/io/iobase_test.py | 123 +- sdks/python/apache_beam/io/localfilesystem.py | 35 +- sdks/python/apache_beam/io/localfilesystem_test.py | 183 +-- sdks/python/apache_beam/io/mongodbio.py | 122 +- sdks/python/apache_beam/io/mongodbio_it_test.py | 93 +- sdks/python/apache_beam/io/mongodbio_test.py | 90 +- sdks/python/apache_beam/io/parquetio.py | 125 +- sdks/python/apache_beam/io/parquetio_it_test.py | 67 +- sdks/python/apache_beam/io/parquetio_test.py | 201 ++-- sdks/python/apache_beam/io/range_trackers.py | 73 +- sdks/python/apache_beam/io/range_trackers_test.py | 143 +-- sdks/python/apache_beam/io/restriction_trackers.py | 26 +- .../apache_beam/io/restriction_trackers_test.py | 7 +- sdks/python/apache_beam/io/source_test_utils.py | 348 +++--- .../apache_beam/io/source_test_utils_test.py | 24 +- sdks/python/apache_beam/io/sources_test.py | 13 +- sdks/python/apache_beam/io/textio.py | 105 +- sdks/python/apache_beam/io/textio_test.py | 290 +++-- sdks/python/apache_beam/io/tfrecordio.py | 124 +- sdks/python/apache_beam/io/tfrecordio_test.py | 185 +-- sdks/python/apache_beam/io/utils.py | 10 +- sdks/python/apache_beam/io/utils_test.py | 6 +- sdks/python/apache_beam/io/vcfio.py | 155 +-- sdks/python/apache_beam/io/vcfio_test.py | 312 +++-- sdks/python/apache_beam/metrics/cells.py | 47 +- sdks/python/apache_beam/metrics/cells_test.py | 35 +- sdks/python/apache_beam/metrics/execution.py | 48 +- sdks/python/apache_beam/metrics/execution_test.py | 8 +- sdks/python/apache_beam/metrics/metric.py | 15 +- sdks/python/apache_beam/metrics/metric_test.py | 18 +- sdks/python/apache_beam/metrics/metricbase.py | 8 +- .../python/apache_beam/metrics/monitoring_infos.py | 77 +- .../apache_beam/metrics/monitoring_infos_test.py | 13 +- .../python/apache_beam/options/pipeline_options.py | 778 +++++++------ .../apache_beam/options/pipeline_options_test.py | 391 ++++--- .../options/pipeline_options_validator.py | 69 +- .../options/pipeline_options_validator_test.py | 302 +++-- sdks/python/apache_beam/options/value_provider.py | 21 +- .../apache_beam/options/value_provider_test.py | 26 +- sdks/python/apache_beam/pipeline.py | 214 ++-- sdks/python/apache_beam/pipeline_test.py | 273 ++--- sdks/python/apache_beam/portability/utils.py | 4 +- sdks/python/apache_beam/pvalue.py | 48 +- sdks/python/apache_beam/pvalue_test.py | 2 - sdks/python/apache_beam/runners/common.py | 121 +- sdks/python/apache_beam/runners/common_test.py | 32 +- .../dataflow/dataflow_exercise_metrics_pipeline.py | 64 +- .../dataflow_exercise_metrics_pipeline_test.py | 1 - ...dataflow_exercise_streaming_metrics_pipeline.py | 32 +- ...low_exercise_streaming_metrics_pipeline_test.py | 51 +- .../runners/dataflow/dataflow_metrics.py | 106 +- .../runners/dataflow/dataflow_metrics_test.py | 696 +++++++----- .../runners/dataflow/dataflow_runner.py | 489 ++++---- .../runners/dataflow/dataflow_runner_test.py | 152 +-- .../runners/dataflow/internal/apiclient.py | 197 ++-- .../runners/dataflow/internal/apiclient_test.py | 488 ++++---- .../internal/clients/dataflow/message_matchers.py | 18 +- .../clients/dataflow/message_matchers_test.py | 14 +- .../runners/dataflow/native_io/iobase.py | 67 +- .../runners/dataflow/native_io/iobase_test.py | 45 +- .../runners/dataflow/ptransform_overrides.py | 29 +- .../runners/dataflow/template_runner_test.py | 59 +- .../runners/dataflow/test_dataflow_runner.py | 12 +- .../apache_beam/runners/direct/bundle_factory.py | 11 +- .../direct/consumer_tracking_pipeline_visitor.py | 4 +- .../consumer_tracking_pipeline_visitor_test.py | 22 +- .../apache_beam/runners/direct/direct_metrics.py | 60 +- .../runners/direct/direct_metrics_test.py | 267 +++-- .../apache_beam/runners/direct/direct_runner.py | 103 +- .../runners/direct/direct_runner_test.py | 57 +- .../apache_beam/runners/direct/direct_userstate.py | 40 +- .../runners/direct/evaluation_context.py | 83 +- sdks/python/apache_beam/runners/direct/executor.py | 169 +-- .../runners/direct/helper_transforms.py | 16 +- .../runners/direct/sdf_direct_runner.py | 112 +- .../runners/direct/sdf_direct_runner_test.py | 116 +- .../apache_beam/runners/direct/test_stream_impl.py | 29 +- .../runners/direct/transform_evaluator.py | 314 +++-- sdks/python/apache_beam/runners/direct/util.py | 13 +- .../runners/direct/watermark_manager.py | 36 +- .../runners/interactive/background_caching_job.py | 47 +- .../interactive/background_caching_job_test.py | 65 +- .../runners/interactive/cache_manager.py | 15 +- .../runners/interactive/caching/streaming_cache.py | 23 +- .../interactive/caching/streaming_cache_test.py | 114 +- .../runners/interactive/display/display_manager.py | 39 +- .../display/interactive_pipeline_graph.py | 19 +- .../interactive/display/pcoll_visualization.py | 39 +- .../display/pcoll_visualization_test.py | 49 +- .../runners/interactive/display/pipeline_graph.py | 30 +- .../interactive/display/pipeline_graph_renderer.py | 19 +- .../interactive/display/pipeline_graph_test.py | 91 +- .../runners/interactive/interactive_beam_test.py | 1 - .../runners/interactive/interactive_environment.py | 22 +- .../interactive/interactive_environment_test.py | 115 +- .../runners/interactive/interactive_runner.py | 33 +- .../runners/interactive/interactive_runner_test.py | 12 +- .../runners/interactive/pipeline_analyzer.py | 117 +- .../runners/interactive/pipeline_analyzer_test.py | 153 ++- .../runners/interactive/pipeline_fragment.py | 35 +- .../runners/interactive/pipeline_fragment_test.py | 25 +- .../runners/interactive/pipeline_instrument.py | 108 +- .../interactive/pipeline_instrument_test.py | 89 +- .../runners/interactive/testing/mock_ipython.py | 2 - .../interactive/testing/pipeline_assertion.py | 56 +- sdks/python/apache_beam/runners/job/manager.py | 9 +- .../python/apache_beam/runners/pipeline_context.py | 23 +- .../apache_beam/runners/pipeline_context_test.py | 7 +- .../runners/portability/abstract_job_service.py | 55 +- .../runners/portability/artifact_service.py | 22 +- .../runners/portability/artifact_service_test.py | 100 +- .../runners/portability/expansion_service.py | 17 +- .../runners/portability/expansion_service_test.py | 54 +- .../runners/portability/flink_runner.py | 38 +- .../runners/portability/flink_runner_test.py | 150 ++- .../portability/flink_uber_jar_job_server.py | 48 +- .../portability/flink_uber_jar_job_server_test.py | 78 +- .../runners/portability/fn_api_runner.py | 557 ++++----- .../runners/portability/fn_api_runner_test.py | 590 +++++----- .../portability/fn_api_runner_transforms.py | 311 ++--- .../apache_beam/runners/portability/job_server.py | 72 +- .../runners/portability/local_job_service.py | 25 +- .../runners/portability/local_job_service_main.py | 5 +- .../runners/portability/local_job_service_test.py | 16 +- .../runners/portability/portable_metrics.py | 8 +- .../runners/portability/portable_runner.py | 145 +-- .../runners/portability/portable_runner_test.py | 114 +- .../runners/portability/portable_stager.py | 3 +- .../runners/portability/portable_stager_test.py | 23 +- .../runners/portability/spark_runner.py | 25 +- .../runners/portability/spark_runner_test.py | 48 +- .../portability/spark_uber_jar_job_server.py | 50 +- .../portability/spark_uber_jar_job_server_test.py | 103 +- .../apache_beam/runners/portability/stager.py | 148 ++- .../apache_beam/runners/portability/stager_test.py | 114 +- sdks/python/apache_beam/runners/runner.py | 63 +- sdks/python/apache_beam/runners/runner_test.py | 29 +- .../apache_beam/runners/worker/bundle_processor.py | 331 +++--- .../apache_beam/runners/worker/channel_factory.py | 4 +- .../apache_beam/runners/worker/data_plane.py | 74 +- .../apache_beam/runners/worker/data_plane_test.py | 48 +- .../apache_beam/runners/worker/log_handler.py | 25 +- .../apache_beam/runners/worker/log_handler_test.py | 17 +- sdks/python/apache_beam/runners/worker/logger.py | 7 +- .../apache_beam/runners/worker/logger_test.py | 78 +- .../apache_beam/runners/worker/opcounters.py | 30 +- .../apache_beam/runners/worker/opcounters_test.py | 85 +- .../apache_beam/runners/worker/operation_specs.py | 155 +-- .../apache_beam/runners/worker/operations.py | 230 ++-- .../apache_beam/runners/worker/sdk_worker.py | 120 +- .../apache_beam/runners/worker/sdk_worker_main.py | 60 +- .../runners/worker/sdk_worker_main_test.py | 35 +- .../apache_beam/runners/worker/sdk_worker_test.py | 16 +- .../apache_beam/runners/worker/sideinputs.py | 24 +- .../apache_beam/runners/worker/sideinputs_test.py | 6 +- .../apache_beam/runners/worker/statecache.py | 35 +- .../apache_beam/runners/worker/statecache_test.py | 128 ++- .../apache_beam/runners/worker/statesampler.py | 34 +- .../runners/worker/statesampler_slow.py | 8 +- .../runners/worker/statesampler_test.py | 24 +- .../runners/worker/worker_id_interceptor.py | 16 +- .../runners/worker/worker_id_interceptor_test.py | 33 +- .../apache_beam/runners/worker/worker_pool_main.py | 121 +- .../apache_beam/runners/worker/worker_status.py | 16 +- .../runners/worker/worker_status_test.py | 5 +- .../testing/benchmarks/chicago_taxi/preprocess.py | 75 +- .../benchmarks/chicago_taxi/process_tfma.py | 46 +- .../testing/benchmarks/chicago_taxi/setup.py | 3 +- .../chicago_taxi/tfdv_analyze_and_validate.py | 52 +- .../benchmarks/chicago_taxi/trainer/model.py | 4 +- .../benchmarks/chicago_taxi/trainer/task.py | 14 +- .../benchmarks/chicago_taxi/trainer/taxi.py | 17 +- .../benchmarks/nexmark/models/nexmark_model.py | 42 +- .../testing/benchmarks/nexmark/nexmark_launcher.py | 82 +- .../testing/benchmarks/nexmark/nexmark_util.py | 11 +- .../testing/benchmarks/nexmark/queries/query0.py | 4 +- .../testing/benchmarks/nexmark/queries/query1.py | 25 +- .../testing/benchmarks/nexmark/queries/query2.py | 15 +- .../apache_beam/testing/datatype_inference.py | 10 +- .../apache_beam/testing/datatype_inference_test.py | 101 +- .../apache_beam/testing/extra_assertions_test.py | 9 +- .../testing/load_tests/co_group_by_key_test.py | 47 +- .../apache_beam/testing/load_tests/combine_test.py | 27 +- .../testing/load_tests/group_by_key_test.py | 27 +- .../apache_beam/testing/load_tests/load_test.py | 11 +- .../testing/load_tests/load_test_metrics_utils.py | 80 +- .../apache_beam/testing/load_tests/pardo_test.py | 36 +- .../testing/load_tests/sideinput_test.py | 42 +- .../streaming/group_by_key_streaming_pipeline.py | 50 +- .../streaming/group_by_key_streaming_test.py | 14 +- .../apache_beam/testing/metric_result_matchers.py | 38 +- .../testing/metric_result_matchers_test.py | 170 ++- .../apache_beam/testing/pipeline_verifiers.py | 28 +- .../apache_beam/testing/pipeline_verifiers_test.py | 66 +- .../apache_beam/testing/synthetic_pipeline.py | 343 +++--- .../apache_beam/testing/synthetic_pipeline_test.py | 67 +- sdks/python/apache_beam/testing/test_pipeline.py | 49 +- .../apache_beam/testing/test_pipeline_test.py | 52 +- sdks/python/apache_beam/testing/test_stream.py | 43 +- .../apache_beam/testing/test_stream_it_test.py | 141 +-- .../python/apache_beam/testing/test_stream_test.py | 441 ++++--- sdks/python/apache_beam/testing/test_utils.py | 36 +- sdks/python/apache_beam/testing/test_utils_test.py | 4 +- sdks/python/apache_beam/testing/util.py | 29 +- sdks/python/apache_beam/testing/util_test.py | 129 ++- .../apache_beam/tools/coders_microbenchmark.py | 90 +- .../tools/distribution_counter_microbenchmark.py | 3 +- .../tools/fn_api_runner_microbenchmark.py | 46 +- .../apache_beam/tools/map_fn_microbenchmark.py | 9 +- .../apache_beam/tools/sideinput_microbenchmark.py | 10 +- sdks/python/apache_beam/tools/utils.py | 28 +- sdks/python/apache_beam/transforms/combiners.py | 155 ++- .../apache_beam/transforms/combiners_test.py | 317 +++--- sdks/python/apache_beam/transforms/core.py | 440 +++---- sdks/python/apache_beam/transforms/core_test.py | 1 - .../python/apache_beam/transforms/create_source.py | 21 +- sdks/python/apache_beam/transforms/create_test.py | 27 +- sdks/python/apache_beam/transforms/cy_combiners.py | 5 +- sdks/python/apache_beam/transforms/display.py | 96 +- sdks/python/apache_beam/transforms/display_test.py | 116 +- .../apache_beam/transforms/dofn_lifecycle_test.py | 8 +- sdks/python/apache_beam/transforms/environments.py | 153 +-- .../apache_beam/transforms/environments_test.py | 32 +- sdks/python/apache_beam/transforms/external.py | 82 +- .../python/apache_beam/transforms/external_java.py | 30 +- .../python/apache_beam/transforms/external_test.py | 97 +- .../apache_beam/transforms/external_test_it.py | 8 +- .../apache_beam/transforms/external_test_py3.py | 43 +- .../apache_beam/transforms/external_test_py37.py | 3 - sdks/python/apache_beam/transforms/ptransform.py | 145 +-- .../apache_beam/transforms/ptransform_test.py | 1199 +++++++++++--------- .../transforms/py_dataflow_distribution_counter.py | 26 +- sdks/python/apache_beam/transforms/sideinputs.py | 23 +- .../apache_beam/transforms/sideinputs_test.py | 216 ++-- sdks/python/apache_beam/transforms/stats.py | 92 +- sdks/python/apache_beam/transforms/stats_test.py | 541 ++++++--- sdks/python/apache_beam/transforms/timeutil.py | 21 +- .../transforms_keyword_only_args_test_py3.py | 21 +- sdks/python/apache_beam/transforms/trigger.py | 320 +++--- sdks/python/apache_beam/transforms/trigger_test.py | 321 ++++-- sdks/python/apache_beam/transforms/userstate.py | 47 +- .../apache_beam/transforms/userstate_test.py | 535 ++++----- sdks/python/apache_beam/transforms/util.py | 226 ++-- sdks/python/apache_beam/transforms/util_test.py | 765 ++++++++----- .../transforms/validate_runner_xlang_test.py | 52 +- sdks/python/apache_beam/transforms/window.py | 104 +- sdks/python/apache_beam/transforms/window_test.py | 264 ++--- .../transforms/write_ptransform_test.py | 21 +- sdks/python/apache_beam/typehints/decorators.py | 138 ++- .../apache_beam/typehints/decorators_test.py | 48 +- .../apache_beam/typehints/decorators_test_py3.py | 101 +- .../typehints/native_type_compatibility.py | 24 +- .../typehints/native_type_compatibility_test.py | 73 +- sdks/python/apache_beam/typehints/opcodes.py | 32 +- sdks/python/apache_beam/typehints/schemas.py | 28 +- sdks/python/apache_beam/typehints/schemas_test.py | 134 +-- .../apache_beam/typehints/trivial_inference.py | 71 +- .../typehints/trivial_inference_test.py | 94 +- .../typehints/trivial_inference_test_py3.py | 16 +- sdks/python/apache_beam/typehints/typecheck.py | 44 +- .../apache_beam/typehints/typed_pipeline_test.py | 125 +- .../typehints/typed_pipeline_test_py3.py | 48 +- sdks/python/apache_beam/typehints/typehints.py | 319 +++--- .../python/apache_beam/typehints/typehints_test.py | 615 +++++----- .../apache_beam/typehints/typehints_test_py3.py | 7 +- sdks/python/apache_beam/utils/annotations.py | 17 +- sdks/python/apache_beam/utils/annotations_test.py | 167 +-- sdks/python/apache_beam/utils/counters.py | 60 +- sdks/python/apache_beam/utils/counters_test.py | 84 +- sdks/python/apache_beam/utils/interactive_utils.py | 8 +- sdks/python/apache_beam/utils/plugin.py | 2 +- sdks/python/apache_beam/utils/processes_test.py | 91 +- sdks/python/apache_beam/utils/profiler.py | 18 +- sdks/python/apache_beam/utils/proto_utils.py | 1 + sdks/python/apache_beam/utils/retry.py | 32 +- sdks/python/apache_beam/utils/retry_test.py | 89 +- sdks/python/apache_beam/utils/subprocess_server.py | 21 +- .../apache_beam/utils/thread_pool_executor.py | 14 +- sdks/python/apache_beam/utils/timestamp.py | 56 +- sdks/python/apache_beam/utils/timestamp_test.py | 81 +- sdks/python/apache_beam/utils/urns.py | 43 +- sdks/python/apache_beam/utils/windowed_value.py | 91 +- .../apache_beam/utils/windowed_value_test.py | 16 +- sdks/python/apache_beam/version.py | 1 - sdks/python/setup.cfg | 14 + sdks/python/test-suites/tox/py37/build.gradle | 3 + sdks/python/tox.ini | 14 + 500 files changed, 22739 insertions(+), 19222 deletions(-) copy .test-infra/jenkins/{job_PreCommit_Go.groovy => job_PreCommit_PythonAutoformatter.groovy} (89%) copy .test-infra/kubernetes/hadoop/LargeITCluster/setup.sh => sdks/python/.yapfignore (61%) mode change 100755 => 100644