From 804dccfcf6630239c62a427ea5d126b1320fdbc0 Mon Sep 17 00:00:00 2001 From: Jon Wayne Parrott Date: Fri, 23 Feb 2018 16:34:37 -0800 Subject: [PATCH] Re-enable lint for tests, remove usage of pylint (#4921) --- packages/google-cloud-vision/.flake8 | 6 ++++++ packages/google-cloud-vision/nox.py | 12 ++---------- packages/google-cloud-vision/tests/system.py | 4 ---- .../google-cloud-vision/tests/unit/test_helpers.py | 1 - 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/packages/google-cloud-vision/.flake8 b/packages/google-cloud-vision/.flake8 index 25168dc87605..1f44a90f8195 100644 --- a/packages/google-cloud-vision/.flake8 +++ b/packages/google-cloud-vision/.flake8 @@ -1,5 +1,11 @@ [flake8] exclude = + # Exclude generated code. + **/proto/** + **/gapic/** + *_pb2.py + + # Standard linting exemptions. __pycache__, .git, *.pyc, diff --git a/packages/google-cloud-vision/nox.py b/packages/google-cloud-vision/nox.py index de6c5865f9ca..e70de2ec145a 100644 --- a/packages/google-cloud-vision/nox.py +++ b/packages/google-cloud-vision/nox.py @@ -103,17 +103,9 @@ def lint(session): serious code quality issues. """ session.interpreter = 'python3.6' - session.install('flake8', 'pylint', 'gcp-devrel-py-tools', *LOCAL_DEPS) + session.install('flake8') session.install('.') - session.run('flake8', 'google/cloud/vision') - session.run( - 'gcp-devrel-py-tools', 'run-pylint', - '--config', 'pylint.config.py', - '--library-filesets', 'google', - '--test-filesets', 'tests', - # Temporarily allow this to fail. - success_codes=range(0, 100)) - + session.run('flake8', 'google', 'tests') @nox.session def lint_setup_py(session): diff --git a/packages/google-cloud-vision/tests/system.py b/packages/google-cloud-vision/tests/system.py index 4525e6b3527d..07503de58ca7 100644 --- a/packages/google-cloud-vision/tests/system.py +++ b/packages/google-cloud-vision/tests/system.py @@ -14,19 +14,15 @@ """System tests for Vision API.""" -import functools import io import os import unittest -import six - from google.cloud import exceptions from google.cloud import storage from google.cloud import vision from test_utils.retry import RetryErrors -from test_utils.retry import RetryResult from test_utils.system import unique_resource_id diff --git a/packages/google-cloud-vision/tests/unit/test_helpers.py b/packages/google-cloud-vision/tests/unit/test_helpers.py index 3985764a7fde..e65ab1b5afb1 100644 --- a/packages/google-cloud-vision/tests/unit/test_helpers.py +++ b/packages/google-cloud-vision/tests/unit/test_helpers.py @@ -24,7 +24,6 @@ from google.cloud.vision_v1 import types - class TestSingleImageHelper(unittest.TestCase): def setUp(self): credentials = mock.Mock(spec=Credentials)