You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by ro...@apache.org on 2017/10/12 22:54:43 UTC

[07/18] beam git commit: re-order imports (AUTOMATED isort)

re-order imports (AUTOMATED isort)


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/94739377
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/94739377
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/94739377

Branch: refs/heads/master
Commit: 94739377e02e992d21f24257189acd1c4ece9d42
Parents: dd6a789
Author: Holden Karau <ho...@us.ibm.com>
Authored: Fri Sep 1 19:56:11 2017 -0700
Committer: Robert Bradshaw <ro...@gmail.com>
Committed: Thu Oct 12 15:50:08 2017 -0700

----------------------------------------------------------------------
 sdks/python/apache_beam/coders/coder_impl.py    |  1 +
 .../apache_beam/coders/coders_test_common.py    |  3 ++-
 .../io/gcp/datastore/v1/datastoreio_test.py     | 24 ++++++++++++--------
 .../python/apache_beam/transforms/ptransform.py |  2 +-
 .../apache_beam/transforms/ptransform_test.py   |  2 +-
 sdks/python/apache_beam/typehints/opcodes.py    |  3 ++-
 .../apache_beam/typehints/trivial_inference.py  |  5 ++--
 7 files changed, 24 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/94739377/sdks/python/apache_beam/coders/coder_impl.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/coders/coder_impl.py b/sdks/python/apache_beam/coders/coder_impl.py
index 9f7b739..172ee74 100644
--- a/sdks/python/apache_beam/coders/coder_impl.py
+++ b/sdks/python/apache_beam/coders/coder_impl.py
@@ -27,6 +27,7 @@ coder_impl.pxd file for type hints.
 For internal use only; no backwards-compatibility guarantees.
 """
 from __future__ import absolute_import
+
 from types import NoneType
 
 from apache_beam.coders import observable

http://git-wip-us.apache.org/repos/asf/beam/blob/94739377/sdks/python/apache_beam/coders/coders_test_common.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/coders/coders_test_common.py b/sdks/python/apache_beam/coders/coders_test_common.py
index d42e637..fc7279d 100644
--- a/sdks/python/apache_beam/coders/coders_test_common.py
+++ b/sdks/python/apache_beam/coders/coders_test_common.py
@@ -24,7 +24,6 @@ import unittest
 
 import dill
 
-from . import observable
 from apache_beam.coders import proto2_coder_test_messages_pb2 as test_message
 from apache_beam.coders import coders
 from apache_beam.runners import pipeline_context
@@ -34,6 +33,8 @@ from apache_beam.utils import timestamp
 from apache_beam.utils import windowed_value
 from apache_beam.utils.timestamp import MIN_TIMESTAMP
 
+from . import observable
+
 
 # Defined out of line for picklability.
 class CustomCoder(coders.Coder):

http://git-wip-us.apache.org/repos/asf/beam/blob/94739377/sdks/python/apache_beam/io/gcp/datastore/v1/datastoreio_test.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/io/gcp/datastore/v1/datastoreio_test.py b/sdks/python/apache_beam/io/gcp/datastore/v1/datastoreio_test.py
index 7c73a06..96866ce 100644
--- a/sdks/python/apache_beam/io/gcp/datastore/v1/datastoreio_test.py
+++ b/sdks/python/apache_beam/io/gcp/datastore/v1/datastoreio_test.py
@@ -1,4 +1,18 @@
 from __future__ import print_function
+
+import unittest
+
+from mock import MagicMock
+from mock import call
+from mock import patch
+
+from apache_beam.io.gcp.datastore.v1 import fake_datastore
+from apache_beam.io.gcp.datastore.v1 import helper
+from apache_beam.io.gcp.datastore.v1 import query_splitter
+from apache_beam.io.gcp.datastore.v1.datastoreio import ReadFromDatastore
+from apache_beam.io.gcp.datastore.v1.datastoreio import WriteToDatastore
+from apache_beam.io.gcp.datastore.v1.datastoreio import _Mutate
+
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -16,18 +30,8 @@ from __future__ import print_function
 # limitations under the License.
 #
 
-import unittest
 
-from mock import MagicMock
-from mock import call
-from mock import patch
 
-from apache_beam.io.gcp.datastore.v1 import fake_datastore
-from apache_beam.io.gcp.datastore.v1 import helper
-from apache_beam.io.gcp.datastore.v1 import query_splitter
-from apache_beam.io.gcp.datastore.v1.datastoreio import ReadFromDatastore
-from apache_beam.io.gcp.datastore.v1.datastoreio import WriteToDatastore
-from apache_beam.io.gcp.datastore.v1.datastoreio import _Mutate
 
 # Protect against environments where datastore library is not available.
 # pylint: disable=wrong-import-order, wrong-import-position, ungrouped-imports

http://git-wip-us.apache.org/repos/asf/beam/blob/94739377/sdks/python/apache_beam/transforms/ptransform.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/transforms/ptransform.py b/sdks/python/apache_beam/transforms/ptransform.py
index d333ace..0b6d608 100644
--- a/sdks/python/apache_beam/transforms/ptransform.py
+++ b/sdks/python/apache_beam/transforms/ptransform.py
@@ -41,6 +41,7 @@ import inspect
 import operator
 import os
 import sys
+from functools import reduce
 
 from google.protobuf import wrappers_pb2
 
@@ -58,7 +59,6 @@ from apache_beam.typehints.trivial_inference import instance_to_type
 from apache_beam.typehints.typehints import validate_composite_type_param
 from apache_beam.utils import proto_utils
 from apache_beam.utils import urns
-from functools import reduce
 
 __all__ = [
     'PTransform',

http://git-wip-us.apache.org/repos/asf/beam/blob/94739377/sdks/python/apache_beam/transforms/ptransform_test.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/transforms/ptransform_test.py b/sdks/python/apache_beam/transforms/ptransform_test.py
index 112c092..c137b14 100644
--- a/sdks/python/apache_beam/transforms/ptransform_test.py
+++ b/sdks/python/apache_beam/transforms/ptransform_test.py
@@ -24,6 +24,7 @@ import collections
 import operator
 import re
 import unittest
+from functools import reduce
 
 import hamcrest as hc
 from nose.plugins.attrib import attr
@@ -48,7 +49,6 @@ from apache_beam.typehints import with_input_types
 from apache_beam.typehints import with_output_types
 from apache_beam.typehints.typehints_test import TypeHintTestCase
 from apache_beam.utils.windowed_value import WindowedValue
-from functools import reduce
 
 # Disable frequent lint warning due to pipe operator for chaining transforms.
 # pylint: disable=expression-not-assigned

http://git-wip-us.apache.org/repos/asf/beam/blob/94739377/sdks/python/apache_beam/typehints/opcodes.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/typehints/opcodes.py b/sdks/python/apache_beam/typehints/opcodes.py
index c3ba92a..dcca6d0 100644
--- a/sdks/python/apache_beam/typehints/opcodes.py
+++ b/sdks/python/apache_beam/typehints/opcodes.py
@@ -27,7 +27,9 @@ are handled inline rather than here.
 For internal use only; no backwards-compatibility guarantees.
 """
 from __future__ import absolute_import
+
 import types
+from functools import reduce
 
 from . import typehints
 from .trivial_inference import BoundMethod
@@ -40,7 +42,6 @@ from .typehints import Iterable
 from .typehints import List
 from .typehints import Tuple
 from .typehints import Union
-from functools import reduce
 
 
 def pop_one(state, unused_arg):

http://git-wip-us.apache.org/repos/asf/beam/blob/94739377/sdks/python/apache_beam/typehints/trivial_inference.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/typehints/trivial_inference.py b/sdks/python/apache_beam/typehints/trivial_inference.py
index df96900..51d3db2 100644
--- a/sdks/python/apache_beam/typehints/trivial_inference.py
+++ b/sdks/python/apache_beam/typehints/trivial_inference.py
@@ -19,18 +19,19 @@
 
 For internal use only; no backwards-compatibility guarantees.
 """
-from __future__ import print_function
 from __future__ import absolute_import
+from __future__ import print_function
+
 import __builtin__
 import collections
 import dis
 import pprint
 import sys
 import types
+from functools import reduce
 
 from apache_beam.typehints import Any
 from apache_beam.typehints import typehints
-from functools import reduce
 
 
 class TypeInferenceError(ValueError):