You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2018/01/19 17:46:45 UTC

[arrow] branch master updated: ARROW-2005: [Python] Fix incorrect flake8 config path to Cython lint config

This is an automated email from the ASF dual-hosted git repository.

wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new a11da7f  ARROW-2005: [Python] Fix incorrect flake8 config path to Cython lint config
a11da7f is described below

commit a11da7f914e117675d9e662fa7b5f78dd02c61ed
Author: Wes McKinney <we...@twosigma.com>
AuthorDate: Fri Jan 19 12:46:40 2018 -0500

    ARROW-2005: [Python] Fix incorrect flake8 config path to Cython lint config
    
    This was silently passing even though the config file was not found. This first build should fail, then I will fix the flakes
    
    Author: Wes McKinney <we...@twosigma.com>
    
    Closes #1488 from wesm/ARROW-2005 and squashes the following commits:
    
    4305e1d1 [Wes McKinney] Fix Cython flakes
    894d4ab3 [Wes McKinney] Fix incorrect flake8 config path to Cython lint config
---
 ci/travis_lint.sh         |  6 +++---
 python/pyarrow/_orc.pxd   |  8 +++++---
 python/pyarrow/_orc.pyx   | 12 +++++++-----
 python/pyarrow/plasma.pyx |  8 +++++---
 4 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/ci/travis_lint.sh b/ci/travis_lint.sh
index e234b7b..6a2a0be 100755
--- a/ci/travis_lint.sh
+++ b/ci/travis_lint.sh
@@ -35,10 +35,10 @@ popd
 # Fail fast on style checks
 sudo pip install flake8
 
-PYARROW_DIR=$TRAVIS_BUILD_DIR/python/pyarrow
+PYTHON_DIR=$TRAVIS_BUILD_DIR/python
 
-flake8 --count $PYARROW_DIR
+flake8 --count $PYTHON_DIR/pyarrow
 
 # Check Cython files with some checks turned off
 flake8 --count --config=$PYTHON_DIR/.flake8.cython \
-       $PYARROW_DIR
+       $PYTHON_DIR/pyarrow
diff --git a/python/pyarrow/_orc.pxd b/python/pyarrow/_orc.pxd
index 4116915..c07a194 100644
--- a/python/pyarrow/_orc.pxd
+++ b/python/pyarrow/_orc.pxd
@@ -29,9 +29,10 @@ from pyarrow.includes.libarrow cimport (CArray, CSchema, CStatus,
                                         TimeUnit)
 
 
-cdef extern from "arrow/adapters/orc/adapter.h" namespace "arrow::adapters::orc" nogil:
-    cdef cppclass ORCFileReader:
+cdef extern from "arrow/adapters/orc/adapter.h" \
+        namespace "arrow::adapters::orc" nogil:
 
+    cdef cppclass ORCFileReader:
         @staticmethod
         CStatus Open(const shared_ptr[RandomAccessFile]& file,
                      CMemoryPool* pool,
@@ -40,7 +41,8 @@ cdef extern from "arrow/adapters/orc/adapter.h" namespace "arrow::adapters::orc"
         CStatus ReadSchema(shared_ptr[CSchema]* out)
 
         CStatus ReadStripe(int64_t stripe, shared_ptr[CRecordBatch]* out)
-        CStatus ReadStripe(int64_t stripe, std_vector[int], shared_ptr[CRecordBatch]* out)
+        CStatus ReadStripe(int64_t stripe, std_vector[int],
+                           shared_ptr[CRecordBatch]* out)
 
         CStatus Read(shared_ptr[CTable]* out)
         CStatus Read(std_vector[int], shared_ptr[CTable]* out)
diff --git a/python/pyarrow/_orc.pyx b/python/pyarrow/_orc.pyx
index 7ff4bac..cf04f48 100644
--- a/python/pyarrow/_orc.pyx
+++ b/python/pyarrow/_orc.pyx
@@ -50,7 +50,7 @@ cdef class ORCReader:
         get_reader(source, &rd_handle)
         with nogil:
             check_status(ORCFileReader.Open(rd_handle, self.allocator,
-                                             &self.reader))
+                                            &self.reader))
 
     def schema(self):
         """
@@ -69,10 +69,10 @@ cdef class ORCReader:
         return pyarrow_wrap_schema(sp_arrow_schema)
 
     def nrows(self):
-        return deref(self.reader).NumberOfRows();
+        return deref(self.reader).NumberOfRows()
 
     def nstripes(self):
-        return deref(self.reader).NumberOfStripes();
+        return deref(self.reader).NumberOfStripes()
 
     def read_stripe(self, n, include_indices=None):
         cdef:
@@ -85,11 +85,13 @@ cdef class ORCReader:
 
         if include_indices is None:
             with nogil:
-                check_status(deref(self.reader).ReadStripe(stripe, &sp_record_batch))
+                (check_status(deref(self.reader)
+                              .ReadStripe(stripe, &sp_record_batch)))
         else:
             indices = include_indices
             with nogil:
-                check_status(deref(self.reader).ReadStripe(stripe, indices, &sp_record_batch))
+                (check_status(deref(self.reader)
+                              .ReadStripe(stripe, indices, &sp_record_batch)))
 
         batch = RecordBatch()
         batch.init(sp_record_batch)
diff --git a/python/pyarrow/plasma.pyx b/python/pyarrow/plasma.pyx
index 29e233b..32f6d18 100644
--- a/python/pyarrow/plasma.pyx
+++ b/python/pyarrow/plasma.pyx
@@ -248,8 +248,8 @@ cdef class PlasmaClient:
             check_status(self.client.get().Get(ids.data(), ids.size(),
                          timeout_ms, result[0].data()))
 
-    cdef _make_plasma_buffer(self, ObjectID object_id, shared_ptr[CBuffer] buffer,
-                             int64_t size):
+    cdef _make_plasma_buffer(self, ObjectID object_id,
+                             shared_ptr[CBuffer] buffer, int64_t size):
         result = PlasmaBuffer(object_id, self)
         result.init(buffer)
         return result
@@ -302,7 +302,9 @@ cdef class PlasmaClient:
             check_status(self.client.get().Create(object_id.data, data_size,
                                                   <uint8_t*>(metadata.data()),
                                                   metadata.size(), &data))
-        return self._make_mutable_plasma_buffer(object_id, data.get().mutable_data(), data_size)
+        return self._make_mutable_plasma_buffer(object_id,
+                                                data.get().mutable_data(),
+                                                data_size)
 
     def get_buffers(self, object_ids, timeout_ms=-1):
         """

-- 
To stop receiving notification emails like this one, please contact
['"commits@arrow.apache.org" <co...@arrow.apache.org>'].