You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wayang.apache.org by be...@apache.org on 2022/04/08 17:16:35 UTC
[incubator-wayang] 14/32: [WAYANG-#8] Update imports
This is an automated email from the ASF dual-hosted git repository.
bertty pushed a commit to branch python-platform
in repository https://gitbox.apache.org/repos/asf/incubator-wayang.git
commit 07e48755c27b1f1146a536620377d79ab06ebd8e
Author: Bertty Contreras-Rojas <be...@databloom.ai>
AuthorDate: Wed Apr 6 18:14:42 2022 +0200
[WAYANG-#8] Update imports
Signed-off-by: bertty <be...@apache.org>
---
python/src/pywy/dataquanta.py | 2 +-
python/src/pywy/graph/graph.py | 2 +-
python/src/pywy/graph/graphtypes.py | 4 ++--
python/src/pywy/platforms/basic/plugin.py | 2 +-
.../platforms/python/operators/PyFilterOperator.py | 14 ++++++++++----
.../python/operators/PyTextFileSinkOperator.py | 13 +++++++------
.../python/operators/PyTextFileSourceOperator.py | 14 +++++++-------
python/src/pywy/platforms/python/plugin/plugin.py | 1 -
python/src/pywy/translate/translator.py | 3 +--
python/src/pywy/types.py | 2 +-
python/src/pywy/wayangplan/base.py | 2 +-
python/src/pywy/wayangplan/unary.py | 21 +++++++++++----------
python/src/pywy/wayangplan/wayang.py | 4 ++--
13 files changed, 45 insertions(+), 39 deletions(-)
diff --git a/python/src/pywy/dataquanta.py b/python/src/pywy/dataquanta.py
index f44540e9..2854b6b0 100644
--- a/python/src/pywy/dataquanta.py
+++ b/python/src/pywy/dataquanta.py
@@ -1,7 +1,7 @@
from typing import Set
from pywy.translate.translator import Translator
-from pywy.types import (GenericTco, Predicate, Function, FlatmapFunction, IterableO)
+from pywy.types import ( GenericTco, Predicate, Function, FlatmapFunction, IterableO )
from pywy.wayangplan import *
from pywy.wayangplan.wayang import PywyPlan
from pywy.platforms.basic.plugin import Plugin
diff --git a/python/src/pywy/graph/graph.py b/python/src/pywy/graph/graph.py
index 6e0a2d08..ff1c68c1 100644
--- a/python/src/pywy/graph/graph.py
+++ b/python/src/pywy/graph/graph.py
@@ -1,5 +1,5 @@
from pywy.types import T
-from typing import Iterable, Dict, Callable, List, Any, Generic
+from typing import ( Iterable, Dict, Callable, List, Any, Generic )
class GraphNode(Generic[T]):
diff --git a/python/src/pywy/graph/graphtypes.py b/python/src/pywy/graph/graphtypes.py
index cef0ff06..fdd12809 100644
--- a/python/src/pywy/graph/graphtypes.py
+++ b/python/src/pywy/graph/graphtypes.py
@@ -1,6 +1,6 @@
-from typing import Iterable, List, Tuple
+from typing import ( Iterable, List )
-from pywy.graph.graph import GraphNode, WayangGraph
+from pywy.graph.graph import ( GraphNode, WayangGraph )
from pywy.wayangplan.base import WyOperator
class NodeOperator(GraphNode[WyOperator]):
diff --git a/python/src/pywy/platforms/basic/plugin.py b/python/src/pywy/platforms/basic/plugin.py
index 88da7f73..1f156d9d 100644
--- a/python/src/pywy/platforms/basic/plugin.py
+++ b/python/src/pywy/platforms/basic/plugin.py
@@ -1,4 +1,4 @@
-from typing import List, Set
+from typing import Set
from pywy.platforms.basic.platform import Platform
from pywy.platforms.basic.mapping import Mapping
diff --git a/python/src/pywy/platforms/python/operators/PyFilterOperator.py b/python/src/pywy/platforms/python/operators/PyFilterOperator.py
index e01d4310..7c0bbf7e 100644
--- a/python/src/pywy/platforms/python/operators/PyFilterOperator.py
+++ b/python/src/pywy/platforms/python/operators/PyFilterOperator.py
@@ -1,9 +1,15 @@
+from typing import Set
from pywy.wayangplan.unary import FilterOperator
from pywy.platforms.python.operators.PythonExecutionOperator import PythonExecutionOperator
-from pywy.platforms.python.channels import (Channel, ChannelDescriptor, PyIteratorChannel,
- PyIteratorChannelDescriptor, PyCallableChannelDescriptor,
- PyCallableChannel)
-from typing import Set
+from pywy.platforms.python.channels import (
+ Channel,
+ ChannelDescriptor,
+ PyIteratorChannel,
+ PyIteratorChannelDescriptor,
+ PyCallableChannelDescriptor,
+ PyCallableChannel
+ )
+
class PyFilterOperator(FilterOperator, PythonExecutionOperator):
diff --git a/python/src/pywy/platforms/python/operators/PyTextFileSinkOperator.py b/python/src/pywy/platforms/python/operators/PyTextFileSinkOperator.py
index 11a779b4..6d9ffaae 100644
--- a/python/src/pywy/platforms/python/operators/PyTextFileSinkOperator.py
+++ b/python/src/pywy/platforms/python/operators/PyTextFileSinkOperator.py
@@ -1,12 +1,13 @@
+from typing import Set
from pywy.wayangplan.sink import TextFileSink
from pywy.platforms.python.operators.PythonExecutionOperator import PythonExecutionOperator
from pywy.platforms.python.channels import (
- Channel,
- ChannelDescriptor,
- PyIteratorChannel,
- PyIteratorChannelDescriptor
- )
-from typing import Set
+ Channel,
+ ChannelDescriptor,
+ PyIteratorChannel,
+ PyIteratorChannelDescriptor
+ )
+
class PyTextFileSinkOperator(TextFileSink, PythonExecutionOperator):
diff --git a/python/src/pywy/platforms/python/operators/PyTextFileSourceOperator.py b/python/src/pywy/platforms/python/operators/PyTextFileSourceOperator.py
index cc36605b..96d9f96d 100644
--- a/python/src/pywy/platforms/python/operators/PyTextFileSourceOperator.py
+++ b/python/src/pywy/platforms/python/operators/PyTextFileSourceOperator.py
@@ -1,13 +1,13 @@
+from typing import Set
from pywy.wayangplan.source import TextFileSource
from pywy.platforms.python.operators.PythonExecutionOperator import PythonExecutionOperator
from pywy.platforms.python.channels import (
- Channel,
- ChannelDescriptor,
- PyIteratorChannel,
- PyIteratorChannelDescriptor,
- PyFileChannelDescriptor
- )
-from typing import Set
+ Channel,
+ ChannelDescriptor,
+ PyIteratorChannel,
+ PyIteratorChannelDescriptor
+ )
+
class PyTextFileSourceOperator(TextFileSource, PythonExecutionOperator):
diff --git a/python/src/pywy/platforms/python/plugin/plugin.py b/python/src/pywy/platforms/python/plugin/plugin.py
index 0d42db7a..010c49cd 100644
--- a/python/src/pywy/platforms/python/plugin/plugin.py
+++ b/python/src/pywy/platforms/python/plugin/plugin.py
@@ -3,7 +3,6 @@ from pywy.platforms.basic.plugin import Plugin
from pywy.platforms.python.mappings import PywyOperatorMappings
-
class PythonPlugin(Plugin):
def __init__(self):
diff --git a/python/src/pywy/translate/translator.py b/python/src/pywy/translate/translator.py
index bb646c4f..288ea90c 100644
--- a/python/src/pywy/translate/translator.py
+++ b/python/src/pywy/translate/translator.py
@@ -1,6 +1,5 @@
-from pywy.graph.graphtypes import WGraphOfVec, NodeVec
+from pywy.graph.graphtypes import ( WGraphOfVec, NodeVec )
from pywy.platforms.basic.plugin import Plugin
-from pywy.wayangplan import WyOperator
from pywy.wayangplan.wayang import PywyPlan
from pywy.platforms.basic.mapping import Mapping
diff --git a/python/src/pywy/types.py b/python/src/pywy/types.py
index 8be502e0..4a0979f5 100644
--- a/python/src/pywy/types.py
+++ b/python/src/pywy/types.py
@@ -1,4 +1,4 @@
-from typing import ( Generic, TypeVar, Callable, Hashable, Iterable)
+from typing import ( Generic, TypeVar, Callable, Hashable, Iterable )
from inspect import signature
T = TypeVar("T") # Type
diff --git a/python/src/pywy/wayangplan/base.py b/python/src/pywy/wayangplan/base.py
index 92d4dfca..1eedf1b8 100644
--- a/python/src/pywy/wayangplan/base.py
+++ b/python/src/pywy/wayangplan/base.py
@@ -1,4 +1,4 @@
-from typing import (TypeVar, Optional, List, Set)
+from typing import ( TypeVar, Optional, List, Set )
from pywy.platforms.basic.channel import ChannelDescriptor
class WyOperator:
diff --git a/python/src/pywy/wayangplan/unary.py b/python/src/pywy/wayangplan/unary.py
index 26c28402..aa1d9573 100644
--- a/python/src/pywy/wayangplan/unary.py
+++ b/python/src/pywy/wayangplan/unary.py
@@ -1,15 +1,16 @@
+from itertools import chain
from pywy.wayangplan.base import WyOperator
from pywy.types import (
- GenericTco,
- GenericUco,
- Predicate,
- getTypePredicate,
- Function,
- getTypeFunction,
- FlatmapFunction,
- getTypeFlatmapFunction
- )
-from itertools import chain
+ GenericTco,
+ GenericUco,
+ Predicate,
+ getTypePredicate,
+ Function,
+ getTypeFunction,
+ FlatmapFunction,
+ getTypeFlatmapFunction
+ )
+
class UnaryToUnaryOperator(WyOperator):
diff --git a/python/src/pywy/wayangplan/wayang.py b/python/src/pywy/wayangplan/wayang.py
index c4d8205d..1e8b16ac 100644
--- a/python/src/pywy/wayangplan/wayang.py
+++ b/python/src/pywy/wayangplan/wayang.py
@@ -1,7 +1,7 @@
-from typing import Iterable, Set
+from typing import ( Iterable, Set )
from pywy.graph.graph import WayangGraph
-from pywy.graph.graphtypes import WGraphOfOperator, NodeOperator, WGraphOfVec, NodeVec
+from pywy.graph.graphtypes import ( NodeOperator, WGraphOfVec, NodeVec )
from pywy.wayangplan.sink import SinkOperator
from pywy.platforms.basic.plugin import Plugin