Skip to content

Commit 3224103

Browse files
committed
fix linting
1 parent 7216d82 commit 3224103

File tree

6 files changed

+8
-7
lines changed

6 files changed

+8
-7
lines changed

Diff for: weaver/processes/execution.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ def log_and_save_update_status_handler(
542542
db = get_db(container)
543543
store = db.get_store(StoreJobs)
544544

545-
def log_and_update_status(message, progress=None, status=None, *_, **kwargs):
545+
def log_and_update_status(message, progress=None, status=None, *_, **kwargs): # pylint: disable=W1113
546546
# type: (str, Optional[Number], Optional[AnyStatusType], Any, Any) -> None
547547
if update_status and status:
548548
status = update_status(status)

Diff for: weaver/processes/ogc_api_process.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import copy
21
from typing import TYPE_CHECKING
32

43
from weaver.processes.constants import PACKAGE_FILE_TYPE, JobInputsOutputsSchema

Diff for: weaver/processes/wps_process_base.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,10 @@ def dispatch(self, process_inputs, process_outputs):
502502
if response.status_code != 201:
503503
LOGGER.error("Request [POST %s] failed with: [%s]", request_url, response.status_code)
504504
self.update_status(
505-
f"Request [POST {request_url}] failed with: [{response.status_code}]\n"
506-
f"{repr_json(response.text, indent=2)}",
505+
(
506+
f"Request [POST {request_url}] failed with: [{response.status_code}]\n"
507+
f"{repr_json(response.text, indent=2)}"
508+
),
507509
RemoteJobProgress.EXECUTION,
508510
Status.FAILED,
509511
level=logging.ERROR,

Diff for: weaver/status.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class Status(Constants):
142142
Status.ERROR,
143143
Status.UNKNOWN
144144
]
145-
AnyStatusType = Union[Status, StatusType, int]
145+
AnyStatusType: TypeAlias = Union[Status, StatusType, int]
146146

147147
AnyStatusCategory: Type[StatusCategory] = Union[
148148
StatusCategory,

Diff for: weaver/typedefs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ class CWL_SchemaName(Protocol):
402402
# update_status(message, progress, status, *args, **kwargs)
403403
UpdateStatusPartialFunction = TypeVar(
404404
"UpdateStatusPartialFunction",
405-
bound=Callable[[str, Number, AnyStatusType, ..., Any], None]
405+
bound=Callable[[str, Number, AnyStatusType, Any, Any], None]
406406
)
407407

408408
DatetimeIntervalType = TypedDict("DatetimeIntervalType", {

Diff for: weaver/wps_restapi/colander_extras.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1983,7 +1983,7 @@ def _bind(self, kw):
19831983
19841984
Based on :meth:`colander._SchemaNode._bind` except that `children` are obtained from the keyword.
19851985
"""
1986-
self.bindings = kw
1986+
self.bindings = kw # pylint: disable=W0201 # false-positive - property exists in colander SchemaNode meta-type
19871987
children = self.get_keyword_items()
19881988
for child in children:
19891989
child._bind(kw)

0 commit comments

Comments
 (0)