Clarify docstring and update run_pylint to be more clear about what steps the 
developer can take


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

Branch: refs/heads/master
Commit: bf910c118b6940fef951d4441762b4c55b199ec1
Parents: 252c679
Author: Holden Karau <hol...@us.ibm.com>
Authored: Thu Sep 7 21:26:51 2017 -0700
Committer: Robert Bradshaw <rober...@gmail.com>
Committed: Thu Oct 12 15:53:55 2017 -0700

----------------------------------------------------------------------
 sdks/python/apache_beam/typehints/typehints.py | 6 +++++-
 sdks/python/run_pylint.sh                      | 2 ++
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/bf910c11/sdks/python/apache_beam/typehints/typehints.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/typehints/typehints.py 
b/sdks/python/apache_beam/typehints/typehints.py
index b78ead2..6e1d8b7 100644
--- a/sdks/python/apache_beam/typehints/typehints.py
+++ b/sdks/python/apache_beam/typehints/typehints.py
@@ -191,7 +191,11 @@ class IndexableTypeConstraint(TypeConstraint):
   """
 
   def _constraint_for_index(self, idx):
-    """Returns the type at the given index."""
+    """Returns the type at the given index. This is used to allow type 
inference
+    to determine the correct type for a specific index. On lists this will also
+    be the same, however for tuples the value will depend on the position. This
+    was added as part of the futurize changes since more of the expressions now
+    index into tuples."""
     raise NotImplementedError
 
 

http://git-wip-us.apache.org/repos/asf/beam/blob/bf910c11/sdks/python/run_pylint.sh
----------------------------------------------------------------------
diff --git a/sdks/python/run_pylint.sh b/sdks/python/run_pylint.sh
index 91d5c4a..06f2072 100755
--- a/sdks/python/run_pylint.sh
+++ b/sdks/python/run_pylint.sh
@@ -89,7 +89,9 @@ futurize_filtered=$(echo "$futurize_results" |grep -v 
'pb2\|typehints.py\|trivia
 count=${#futurize_filtered}
 if [ "$count" != "0" ]; then
   echo "Some of the changes require futurize stage 1 changes."
+  echo "The files with required changes:"
   echo "$futurize_filtered"
+  echo "You can run futurize apache_beam to see the proposed changes."
   exit 1
 fi
 echo "No future changes needed"

Reply via email to