You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by ko...@apache.org on 2019/11/17 02:43:54 UTC

[avro] branch master updated: AVRO-2615: Fail the Linter when Pycodestyle Fails (#715)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 3953878  AVRO-2615: Fail the Linter when Pycodestyle Fails (#715)
3953878 is described below

commit 3953878891efdc2a222e57382c3cfeab0a70079c
Author: Michael A. Smith <mi...@smith-li.com>
AuthorDate: Sat Nov 16 21:43:48 2019 -0500

    AVRO-2615: Fail the Linter when Pycodestyle Fails (#715)
    
    * AVRO-2615: Fail the Linter when Pycodestyle Fails
    
    * AVRO-2615: Fix Lint Failure
---
 lang/py3/avro/tests/test_datafile.py | 3 +--
 lang/py3/setup.py                    | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/lang/py3/avro/tests/test_datafile.py b/lang/py3/avro/tests/test_datafile.py
index 9ad6a32..2a60b7e 100644
--- a/lang/py3/avro/tests/test_datafile.py
+++ b/lang/py3/avro/tests/test_datafile.py
@@ -291,8 +291,7 @@ class TestDataFile(unittest.TestCase):
     """A reader should not fail to read a file consisting of a single empty block."""
     file_path = self.NewTempFile()
     sample_schema = schema.parse(SCHEMAS_TO_VALIDATE[1][0])
-    with datafile.DataFileWriter(open(file_path, 'wb'), io.DatumWriter(),
-        sample_schema) as dfw:
+    with datafile.DataFileWriter(open(file_path, 'wb'), io.DatumWriter(), sample_schema) as dfw:
       dfw.flush()
       # Write an empty block
       dfw.encoder.write_long(0)
diff --git a/lang/py3/setup.py b/lang/py3/setup.py
index f6297bb..1e60195 100755
--- a/lang/py3/setup.py
+++ b/lang/py3/setup.py
@@ -152,7 +152,7 @@ class LintCommand(setuptools.Command):
         except StopIteration:
             env = None  # pycodestyle is already installed
         try:
-            subprocess.run(['python3', '-m', 'pycodestyle', '.'], env=env)
+            subprocess.run(['python3', '-m', 'pycodestyle', '.'], env=env, check=True)
         except subprocess.CalledProcessError:
             raise distutils.errors.DistutilsError("pycodestyle exited with a nonzero exit code.")