Skip to content

Commit

Permalink
apply fix-lint following hack around
Browse files Browse the repository at this point in the history
  • Loading branch information
fmigneault committed May 13, 2021
1 parent 70a1c3e commit a16dc9f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions weaver/datatype.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class Base(dict):
Explicitly overridden ``getter``/``setter`` attributes are called instead of ``dict``-key ``get``/``set``-item
to ensure corresponding checks and/or value adjustments are executed before applying it to the sub-``dict``.
"""

def __setattr__(self, item, value):
# use the existing property setter if defined
prop = getattr(type(self), item)
Expand Down
1 change: 1 addition & 0 deletions weaver/processes/wps_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class WpsWorkflow(ProcessCWL):
Definition of a ``CWL`` ``workflow`` that can execute ``WPS`` application packages as defined by
:class:`weaver.processes.wps_package.WpsPackage` as job steps.
"""

def __init__(self, toolpath_object, loading_context, get_job_process_definition):
# type: (Dict[Text, Any], LoadingContext, GetJobProcessDefinitionFunction) -> None
super(WpsWorkflow, self).__init__(toolpath_object, loading_context)
Expand Down
4 changes: 4 additions & 0 deletions weaver/store/mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ class MongodbProcessStore(StoreProcesses, MongodbStore):
"""
Registry for processes. Uses `MongoDB` to store processes and attributes.
"""

def __init__(self, *args, **kwargs):
db_args, db_kwargs = MongodbStore.get_args_kwargs(*args, **kwargs)
StoreProcesses.__init__(self)
Expand Down Expand Up @@ -387,6 +388,7 @@ class MongodbJobStore(StoreJobs, MongodbStore):
"""
Registry for process jobs tracking. Uses `MongoDB` to store job attributes.
"""

def __init__(self, *args, **kwargs):
db_args, db_kwargs = MongodbStore.get_args_kwargs(*args, **kwargs)
StoreJobs.__init__(self)
Expand Down Expand Up @@ -637,6 +639,7 @@ class MongodbQuoteStore(StoreQuotes, MongodbStore):
"""
Registry for quotes. Uses `MongoDB` to store quote attributes.
"""

def __init__(self, *args, **kwargs):
db_args, db_kwargs = MongodbStore.get_args_kwargs(*args, **kwargs)
StoreQuotes.__init__(self)
Expand Down Expand Up @@ -708,6 +711,7 @@ class MongodbBillStore(StoreBills, MongodbStore):
"""
Registry for bills. Uses `MongoDB` to store bill attributes.
"""

def __init__(self, *args, **kwargs):
db_args, db_kwargs = MongodbStore.get_args_kwargs(*args, **kwargs)
StoreBills.__init__(self)
Expand Down
1 change: 1 addition & 0 deletions weaver/wps/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class WorkerService(ServiceWPS):
When receiving ``Execute`` request, convert the XML payload to corresponding JSON and
dispatch it to the Celery Worker to actually process it after job setup for monitoring.
"""

def __init__(self, *_, is_worker=False, settings=None, **__):
super(WorkerService, self).__init__(*_, **__)
self.is_worker = is_worker
Expand Down
7 changes: 7 additions & 0 deletions weaver/wps_restapi/colander_extras.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ class OneOfCaseInsensitive(colander.OneOf):
"""
Validator that ensures the given value matches one of the available choices, but allowing case insensitive values.
"""

def __call__(self, node, value):
if str(value).lower() not in (choice.lower() for choice in self.choices):
return super(OneOfCaseInsensitive, self).__call__(node, value)
Expand All @@ -113,6 +114,7 @@ class StringRange(colander.Range):
"""
Validator that provides the same functionalities as :class:`colander.Range` for a numerical string value.
"""

def __init__(self, min=None, max=None, **kwargs):
try:
if isinstance(min, str):
Expand All @@ -139,6 +141,7 @@ class SchemeURL(colander.Regex):
:class:`colander.url` [remote http(s)/ftp(s)]
:class:`colander.file_uri` [local file://]
"""

def __init__(self, schemes=None, msg=None, flags=re.IGNORECASE):
if not schemes:
schemes = [""]
Expand Down Expand Up @@ -861,6 +864,7 @@ class AnyKeyObject(PermissiveMappingSchema):
This class is only a shorthand definition of ``unknown`` keyword for convenience.
All :class:`colander.MappingSchema` support this natively.
"""

def __init__(self, *args, **kwargs):
kwargs["unknown"] = "preserve"
super(PermissiveMappingSchema, self).__init__(*args, **kwargs)
Expand Down Expand Up @@ -1478,6 +1482,7 @@ def _deserialize_keyword(self, cstruct):

class KeywordTypeConverter(TypeConverter):
"""Generic keyword converter that builds schema with a list of sub-schemas under the keyword."""

def convert_type(self, schema_node):
keyword = schema_node.get_keyword_name()
keyword_schema = {
Expand All @@ -1500,6 +1505,7 @@ class OneOfKeywordTypeConverter(KeywordTypeConverter):
.. seealso::
- :class:`OneOfKeywordSchema`
"""

def convert_type(self, schema_node):
# type: (OneOfKeywordSchema) -> Dict
keyword = schema_node.get_keyword_name()
Expand Down Expand Up @@ -1568,6 +1574,7 @@ class VariableObjectTypeConverter(ObjectTypeConverter):
Updates the mapping object's ``additionalProperties`` for each ``properties``
that a marked as :class:`VariableSchemaNode`.
"""

def convert_type(self, schema_node):
converted = super(VariableObjectTypeConverter, self).convert_type(schema_node)
converted.setdefault("additionalProperties", {})
Expand Down

0 comments on commit a16dc9f

Please sign in to comment.