Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
fmigneault committed Nov 11, 2024
1 parent 7216d82 commit 3224103
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion weaver/processes/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ def log_and_save_update_status_handler(
db = get_db(container)
store = db.get_store(StoreJobs)

def log_and_update_status(message, progress=None, status=None, *_, **kwargs):
def log_and_update_status(message, progress=None, status=None, *_, **kwargs): # pylint: disable=W1113
# type: (str, Optional[Number], Optional[AnyStatusType], Any, Any) -> None
if update_status and status:
status = update_status(status)
Expand Down
1 change: 0 additions & 1 deletion weaver/processes/ogc_api_process.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import copy
from typing import TYPE_CHECKING

from weaver.processes.constants import PACKAGE_FILE_TYPE, JobInputsOutputsSchema
Expand Down
6 changes: 4 additions & 2 deletions weaver/processes/wps_process_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,10 @@ def dispatch(self, process_inputs, process_outputs):
if response.status_code != 201:
LOGGER.error("Request [POST %s] failed with: [%s]", request_url, response.status_code)
self.update_status(
f"Request [POST {request_url}] failed with: [{response.status_code}]\n"
f"{repr_json(response.text, indent=2)}",
(
f"Request [POST {request_url}] failed with: [{response.status_code}]\n"
f"{repr_json(response.text, indent=2)}"
),
RemoteJobProgress.EXECUTION,
Status.FAILED,
level=logging.ERROR,
Expand Down
2 changes: 1 addition & 1 deletion weaver/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class Status(Constants):
Status.ERROR,
Status.UNKNOWN
]
AnyStatusType = Union[Status, StatusType, int]
AnyStatusType: TypeAlias = Union[Status, StatusType, int]

AnyStatusCategory: Type[StatusCategory] = Union[
StatusCategory,
Expand Down
2 changes: 1 addition & 1 deletion weaver/typedefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ class CWL_SchemaName(Protocol):
# update_status(message, progress, status, *args, **kwargs)
UpdateStatusPartialFunction = TypeVar(
"UpdateStatusPartialFunction",
bound=Callable[[str, Number, AnyStatusType, ..., Any], None]
bound=Callable[[str, Number, AnyStatusType, Any, Any], None]
)

DatetimeIntervalType = TypedDict("DatetimeIntervalType", {
Expand Down
2 changes: 1 addition & 1 deletion weaver/wps_restapi/colander_extras.py
Original file line number Diff line number Diff line change
Expand Up @@ -1983,7 +1983,7 @@ def _bind(self, kw):
Based on :meth:`colander._SchemaNode._bind` except that `children` are obtained from the keyword.
"""
self.bindings = kw
self.bindings = kw # pylint: disable=W0201 # false-positive - property exists in colander SchemaNode meta-type
children = self.get_keyword_items()
for child in children:
child._bind(kw)
Expand Down

0 comments on commit 3224103

Please sign in to comment.