From 78a85ec60ad4765418a950c2b5baa62a40578561 Mon Sep 17 00:00:00 2001 From: ogolovatyi Date: Thu, 28 Mar 2019 12:57:59 -0700 Subject: [PATCH] Fix pycodstyle warnings --- tabpy-tools/tabpy_tools/rest_client.py | 4 ++-- tabpy-tools/tabpy_tools/schema.py | 2 +- tabpy-tools/tools_tests/test_rest_object.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tabpy-tools/tabpy_tools/rest_client.py b/tabpy-tools/tabpy_tools/rest_client.py index dc7b0078..557f6f12 100755 --- a/tabpy-tools/tabpy_tools/rest_client.py +++ b/tabpy-tools/tabpy_tools/rest_client.py @@ -122,6 +122,7 @@ def __init__(self, **kwargs): super(AliasEndpoint, self).__init__(**kwargs) self.type = 'alias' + class RESTServiceClient(object): """A thin client for the REST Service.""" @@ -141,10 +142,9 @@ def query(self, name, *args, **kwargs): 'Mixing of keyword arguments and positional arguments ' 'when querying an endpoint is not supported.') return self.service_client.POST('query/'+name, - data={'data':args or kwargs}, + data={'data': args or kwargs}, timeout=self.query_timeout) - def get_endpoint_upload_destination(self): """Returns a dict representing where endpoint data should be uploaded. diff --git a/tabpy-tools/tabpy_tools/schema.py b/tabpy-tools/tabpy_tools/schema.py index 88a2ac53..e1d95d48 100755 --- a/tabpy-tools/tabpy_tools/schema.py +++ b/tabpy-tools/tabpy_tools/schema.py @@ -99,7 +99,7 @@ def generate_schema(input, output, input_description=None, output_description=No 'properties': {'y': {'type': 'integer', 'description': 'value of y'}, 'x': {'type': 'integer', 'description': 'value of x'}}}, 'output': {'type': 'integer', 'description': 'x times y'}} - ''' # noqa: E501 + ''' # noqa: E501 input_schema = _generate_schema_from_example_and_description( input, input_description) output_schema = _generate_schema_from_example_and_description( diff --git a/tabpy-tools/tools_tests/test_rest_object.py b/tabpy-tools/tools_tests/test_rest_object.py index d500b924..e673d1c6 100644 --- a/tabpy-tools/tools_tests/test_rest_object.py +++ b/tabpy-tools/tools_tests/test_rest_object.py @@ -38,7 +38,7 @@ class FooObject(RESTObject): self.assertEqual(set(f.keys()), set(['f', 'i', 's'])) self.assertEqual(set(f.values()), set([6.0, 3, "hello!"])) self.assertEqual(set(f.items()), set( - [('f',6.0),('i',3), ('s',"hello!")])) + [('f', 6.0), ('i', 3), ('s', "hello!")])) f.e = "a" self.assertEqual(f.e, "a")