Skip to content

Commit bada666

Browse files
committed
PEP8 compliance
1 parent 407eb51 commit bada666

11 files changed

Lines changed: 25 additions & 32 deletions

File tree

pywps/app/Process.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ def execute(self, wps_request, uuid):
161161

162162
return wps_response
163163

164-
165164
def _set_uuid(self, uuid):
166165
"""Set uuid and status location path and url
167166
"""

pywps/app/Service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def file_handler(complexinput, datain):
249249
inpt_file = os.path.abspath(inpt_file)
250250
os.symlink(inpt_file, tmp_file)
251251
LOGGER.debug("Linked input file %s to %s.", inpt_file, tmp_file)
252-
except Exception as e:
252+
except Exception:
253253
# TODO: handle os.symlink on windows
254254
# raise NoApplicableCode("Could not link file reference: %s" % e)
255255
LOGGER.warn("Could not link file reference")

pywps/dblog.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ def update_response(uuid, response, close=False):
122122
status_percentage = None
123123
status = None
124124

125-
126125
if hasattr(response, 'message'):
127126
message = response.message
128127
if hasattr(response, 'status_percentage'):

pywps/exceptions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,8 @@ def __init__(self, description="", locator="", code=400):
156156
description = description or self.description
157157
NoApplicableCode.__init__(self, description=description, locator=locator, code=code)
158158

159-
159+
160160
class SchedulerNotAvailable(NoApplicableCode):
161161
"""Job scheduler not available exception implementation
162162
"""
163163
code = 400
164-

pywps/ext_autodoc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ class ProcessDocumenter(ClassDocumenter):
3030
directivetype = 'class'
3131
objtype = 'process'
3232
priority = ClassDocumenter.priority + 1
33-
option_spec = {'skiplines':directives.nonnegative_int,
34-
'docstring':bool_option}
33+
option_spec = {'skiplines': directives.nonnegative_int,
34+
'docstring': bool_option}
3535
option_spec.update(ClassDocumenter.option_spec)
3636

3737
@classmethod
@@ -111,7 +111,7 @@ class instance.
111111
for i in obj.outputs:
112112
doc.append("{} : {}".format(i.identifier, self.fmt_type(i)))
113113
doc.append(" {}".format(i.abstract or i.title))
114-
doc.extend(['',''])
114+
doc.extend(['', ''])
115115

116116
# Metadata
117117
hasref = False

pywps/inout/basic.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,6 @@ def set_data(self, data):
306306

307307
IOHandler.set_data(self, data)
308308

309-
310-
311309
data = property(fget=get_data, fset=set_data)
312310

313311

pywps/inout/inputs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ class LiteralInput(basic.LiteralInput):
293293
should be :class:`pywps.app.Common.Metadata` objects.
294294
"""
295295

296-
297296
def __init__(self, identifier, title, data_type='integer', abstract='', keywords=[],
298297
metadata=[], uoms=None,
299298
min_occurs=1, max_occurs=1,

pywps/response/__init__.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from pywps.dblog import update_response
22
from pywps.response.status import STATUS
33

4+
45
def get_response(operation):
56

67
from .capabilities import CapabilitiesResponse
@@ -14,6 +15,7 @@ def get_response(operation):
1415
elif operation == "execute":
1516
return ExecuteResponse
1617

18+
1719
class WPSResponse(object):
1820

1921
def __init__(self, wps_request, uuid=None):
@@ -25,11 +27,9 @@ def __init__(self, wps_request, uuid=None):
2527
self.status_percentage = 0
2628
self.doc = None
2729

28-
self.update_status(message="Request accepted", status_percentage=0,
29-
status=self.status)
30+
self.update_status(message="Request accepted", status_percentage=0, status=self.status)
3031

31-
def update_status(self, message=None, status_percentage=None, status=None,
32-
clean=True):
32+
def update_status(self, message=None, status_percentage=None, status=None, clean=True):
3333
"""
3434
Update status report of currently running process instance
3535
@@ -58,14 +58,10 @@ def get_response_doc(self):
5858
msg = e.description
5959
else:
6060
msg = e
61-
self.update_status(message=msg,
62-
status_percentage=100,
63-
status=STATUS.ERROR_STATUS)
61+
self.update_status(message=msg, status_percentage=100, status=STATUS.ERROR_STATUS)
6462
raise e
6563

6664
else:
67-
self.update_status(message="Response generated",
68-
status_percentage=100,
69-
status=STATUS.DONE_STATUS)
65+
self.update_status(message="Response generated", status_percentage=100, status=STATUS.DONE_STATUS)
7066

7167
return self.doc

pywps/response/capabilities.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from pywps.response import WPSResponse
66
from pywps.response.status import STATUS
77

8+
89
class CapabilitiesResponse(WPSResponse):
910

1011
def __init__(self, wps_request, uuid, **kwargs):

pywps/response/describe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
from pywps.response import WPSResponse
99
from pywps.response.status import STATUS
1010

11+
1112
class DescribeResponse(WPSResponse):
1213

1314
def __init__(self, wps_request, uuid, **kwargs):
14-
15+
1516
super(DescribeResponse, self).__init__(wps_request, uuid)
1617

1718
self.identifiers = None
1819
if "identifiers" in kwargs:
1920
self.identifiers = kwargs["identifiers"]
2021
self.processes = kwargs["processes"]
2122

22-
2323
def _construct_doc(self):
2424

2525
if not self.identifiers:

0 commit comments

Comments
 (0)