diff --git a/wcs/admin/api_access.py b/wcs/admin/api_access.py index e5e5e58ae..d4538ad0a 100644 --- a/wcs/admin/api_access.py +++ b/wcs/admin/api_access.py @@ -33,7 +33,7 @@ from wcs.qommon.form import StringWidget from wcs.qommon.form import TextWidget -class ApiAccessUI(object): +class ApiAccessUI: def __init__(self, api_access): self.api_access = api_access if self.api_access is None: diff --git a/wcs/admin/categories.py b/wcs/admin/categories.py index b555d5eb0..12bbd0197 100644 --- a/wcs/admin/categories.py +++ b/wcs/admin/categories.py @@ -34,7 +34,7 @@ from wcs.qommon.form import StringWidget from wcs.qommon.form import WysiwygTextWidget -class CategoryUI(object): +class CategoryUI: category_class = Category def __init__(self, category): diff --git a/wcs/admin/data_sources.py b/wcs/admin/data_sources.py index 5c1246998..e484b90eb 100644 --- a/wcs/admin/data_sources.py +++ b/wcs/admin/data_sources.py @@ -48,7 +48,7 @@ from wcs.qommon.form import get_response from wcs.qommon.form import get_session -class NamedDataSourceUI(object): +class NamedDataSourceUI: def __init__(self, datasource): self.datasource = datasource if self.datasource is None: diff --git a/wcs/admin/forms.py b/wcs/admin/forms.py index 78da0a954..d6788f92d 100644 --- a/wcs/admin/forms.py +++ b/wcs/admin/forms.py @@ -86,7 +86,7 @@ def get_categories(category_class): return [x[1:] for x in t] -class FormDefUI(object): +class FormDefUI: formdef_class = FormDef category_class = Category @@ -1521,7 +1521,7 @@ class FormDefPage(Directory): return self.archive_submit(form) def archive_submit(self, form): - class Archiver(object): + class Archiver: def __init__(self, formdef): self.formdef = formdef @@ -1625,7 +1625,7 @@ class FormDefPage(Directory): return self.anonymise_submit(form) def anonymise_submit(self, form): - class Anonymiser(object): + class Anonymiser: def __init__(self, formdef, status_ids, before_date): self.formdef = formdef self.status_ids = ["wf-%s" % id for id in status_ids] diff --git a/wcs/admin/roles.py b/wcs/admin/roles.py index 76dc278ec..86b67a65b 100644 --- a/wcs/admin/roles.py +++ b/wcs/admin/roles.py @@ -35,7 +35,7 @@ from wcs.qommon.form import WidgetList from wcs.roles import get_user_roles -class RoleUI(object): +class RoleUI: def __init__(self, role): self.role = role if self.role is None: diff --git a/wcs/admin/settings.py b/wcs/admin/settings.py index 5791a763a..e9c2cfdfb 100644 --- a/wcs/admin/settings.py +++ b/wcs/admin/settings.py @@ -1005,7 +1005,7 @@ class SettingsDirectory(QommonSettingsDirectory): r += form.render() return r.getvalue() - class Exporter(object): + class Exporter: def __init__(self, dirs, settings): self.app_dir = get_publisher().app_dir self.dirs = dirs diff --git a/wcs/admin/users.py b/wcs/admin/users.py index 301d23db7..4c01766d1 100644 --- a/wcs/admin/users.py +++ b/wcs/admin/users.py @@ -46,7 +46,7 @@ from wcs.qommon.ident.idp import is_idp_managing_user_attributes from wcs.qommon.ident.idp import is_idp_managing_user_roles -class UserUI(object): +class UserUI: def __init__(self, user): self.user = user diff --git a/wcs/admin/workflows.py b/wcs/admin/workflows.py index 0de7b8a4f..ea99f7ce5 100644 --- a/wcs/admin/workflows.py +++ b/wcs/admin/workflows.py @@ -301,7 +301,7 @@ def graphviz(workflow, url_prefix='', select=None, svg=True, include=False): return out -class WorkflowUI(object): +class WorkflowUI: def __init__(self, workflow): self.workflow = workflow diff --git a/wcs/admin/wscalls.py b/wcs/admin/wscalls.py index fdb1b0831..ae14cf62f 100644 --- a/wcs/admin/wscalls.py +++ b/wcs/admin/wscalls.py @@ -42,7 +42,7 @@ from wcs.wscalls import NamedWsCall from wcs.wscalls import WsCallRequestWidget -class NamedWsCallUI(object): +class NamedWsCallUI: def __init__(self, wscall): self.wscall = wscall if self.wscall is None: diff --git a/wcs/backoffice/management.py b/wcs/backoffice/management.py index 8c2d59e49..a96bbb196 100644 --- a/wcs/backoffice/management.py +++ b/wcs/backoffice/management.py @@ -3370,7 +3370,7 @@ class FormBackOfficeStatusPage(FormStatusPage): return self.test_tool_result() -class FakeField(object): +class FakeField: def __init__(self, id, type_, label, addable=True): self.id = id self.type = type_ diff --git a/wcs/cache.py b/wcs/cache.py index ff9be2c20..77f8cb9ce 100644 --- a/wcs/cache.py +++ b/wcs/cache.py @@ -20,7 +20,7 @@ from django.utils.module_loading import import_string from quixote import get_publisher -class TenantBaseCache(object): +class TenantBaseCache: '''Prepend the tenant application directory to the cache prefix''' def set_key_prefix(self, prefix): diff --git a/wcs/conditions.py b/wcs/conditions.py index d595da0ba..8d513e0c6 100644 --- a/wcs/conditions.py +++ b/wcs/conditions.py @@ -30,7 +30,7 @@ class ValidationError(ValueError): pass -class Condition(object): +class Condition: record_errors = True log_errors = False diff --git a/wcs/data_sources.py b/wcs/data_sources.py index 0746143ba..ec1889a2c 100644 --- a/wcs/data_sources.py +++ b/wcs/data_sources.py @@ -810,7 +810,7 @@ class StubNamedDataSource(NamedDataSource): return '' % self.name -class DataSourcesSubstitutionProxy(object): +class DataSourcesSubstitutionProxy: def __getattr__(self, attr): return get_structured_items(NamedDataSource.get_by_slug(attr).data_source) diff --git a/wcs/fields.py b/wcs/fields.py index 0512a6b03..1a837531b 100644 --- a/wcs/fields.py +++ b/wcs/fields.py @@ -248,7 +248,7 @@ class PrefillSelectionWidget(CompositeWidget): return r.getvalue() -class Field(object): +class Field: id = None type = None varname = None @@ -1762,7 +1762,7 @@ class MapOptionsMixin: ) -class ItemFieldMixin(object): +class ItemFieldMixin: def add_items_fields_admin_form(self, form): real_data_source = data_sources.get_real(self.data_source) form.add( @@ -2444,7 +2444,7 @@ class PageCondition(Condition): # 1) feed the form_var_* variables in the global substitution system, # they will shadow formdata context variables with their new "live" # value, this may be useful when evaluating data sources. - class ConditionVars(object): + class ConditionVars: def __init__(self, id_dict_var): # keep track of reference dictionary self.id_dict_var = id_dict_var diff --git a/wcs/formdata.py b/wcs/formdata.py index 1d5c1632f..b9cc1397d 100644 --- a/wcs/formdata.py +++ b/wcs/formdata.py @@ -112,7 +112,7 @@ def flatten_dict(d): del d[k] -class Evolution(object): +class Evolution: who = None status = None time = None diff --git a/wcs/formdef.py b/wcs/formdef.py index 51ec0f0e1..500c7a482 100644 --- a/wcs/formdef.py +++ b/wcs/formdef.py @@ -77,7 +77,7 @@ class FormdefImportRecoverableError(FormdefImportError): pass -class FormField(object): +class FormField: # only used to unpickle form fields from older (<200603) versions def __setstate__(self, dict): type = dict['type'] @@ -1523,7 +1523,7 @@ class FormDef(StorableObject): if changed: formdef.store() - class _EmptyClass(object): # helper for instance creation without calling __init__ + class _EmptyClass: # helper for instance creation without calling __init__ pass def __copy__(self, memo=None, deepcopy=False): diff --git a/wcs/forms/backoffice.py b/wcs/forms/backoffice.py index 68becab2e..8fc64edbd 100644 --- a/wcs/forms/backoffice.py +++ b/wcs/forms/backoffice.py @@ -31,7 +31,7 @@ from ..qommon import misc from ..qommon.backoffice.listing import pagination_links -class FormDefUI(object): +class FormDefUI: def __init__(self, formdef): self.formdef = formdef diff --git a/wcs/forms/common.py b/wcs/forms/common.py index 8145adf48..fde3502db 100644 --- a/wcs/forms/common.py +++ b/wcs/forms/common.py @@ -128,7 +128,7 @@ class FilesDirectory(Directory): return FileDirectory(self.formdata, reference=component) -class FormTemplateMixin(object): +class FormTemplateMixin: def get_formdef_template_variants(self, template_names): template_part_names = [(os.path.dirname(x), os.path.basename(x)) for x in template_names] for dirname, basename in template_part_names: diff --git a/wcs/logged_errors.py b/wcs/logged_errors.py index 92087be07..f777e79c8 100644 --- a/wcs/logged_errors.py +++ b/wcs/logged_errors.py @@ -23,7 +23,7 @@ from wcs.workflows import Workflow from .qommon.misc import simplify -class LoggedError(object): +class LoggedError: _names = 'logged-errors' id = None diff --git a/wcs/portfolio.py b/wcs/portfolio.py index 703c7f67b..c99db74fb 100644 --- a/wcs/portfolio.py +++ b/wcs/portfolio.py @@ -55,7 +55,7 @@ def fargo_url(url): # Allow doing a signed POST in an afterjob, as fargo_url() does not work if no request is in # context; so we do it in the constructor. -class fargo_post_json_async(object): +class fargo_post_json_async: def __init__(self, url, payload): self.url = fargo_url(url) self.payload = payload diff --git a/wcs/qommon/cron.py b/wcs/qommon/cron.py index 3de755063..977af85e5 100644 --- a/wcs/qommon/cron.py +++ b/wcs/qommon/cron.py @@ -19,7 +19,7 @@ import sys from django.conf import settings -class CronJob(object): +class CronJob: name = None hours = None minutes = None diff --git a/wcs/qommon/ctl.py b/wcs/qommon/ctl.py index b411a3531..5bb29c043 100644 --- a/wcs/qommon/ctl.py +++ b/wcs/qommon/ctl.py @@ -33,7 +33,7 @@ from . import _ qommon._commands = {} -class Command(object): +class Command: doc = '' name = None usage_args = '[ options ... ]' @@ -88,7 +88,7 @@ class Command(object): qommon._commands[cls.name] = cls -class Ctl(object): +class Ctl: def __init__(self, cmd_prefixes=None): self.cmd_prefixes = cmd_prefixes or [] self.parser = optparse.OptionParser( diff --git a/wcs/qommon/emails.py b/wcs/qommon/emails.py index c612c3be8..bd08e2d43 100644 --- a/wcs/qommon/emails.py +++ b/wcs/qommon/emails.py @@ -392,7 +392,7 @@ def create_smtp_server(emails_cfg, smtp_timeout=None): return s -class EmailToSend(object): +class EmailToSend: def __init__(self, msg_from, rcpts, msg, smtp_timeout): self.msg_from = msg_from self.rcpts = rcpts diff --git a/wcs/qommon/errors.py b/wcs/qommon/errors.py index b8b97da49..c0f351db5 100644 --- a/wcs/qommon/errors.py +++ b/wcs/qommon/errors.py @@ -80,7 +80,7 @@ class EmailError(Exception): pass -class InternalServerError(object): +class InternalServerError: def render(self): from . import _ diff --git a/wcs/qommon/form.py b/wcs/qommon/form.py index dd54ed3cd..46971ef01 100644 --- a/wcs/qommon/form.py +++ b/wcs/qommon/form.py @@ -498,7 +498,7 @@ class Form(QuixoteForm): widget.add_media() -class HtmlWidget(object): +class HtmlWidget: error = None name = None @@ -996,7 +996,7 @@ class EmailWidget(StringWidget): self.error = _('invalid address domain') -class OptGroup(object): +class OptGroup: def __init__(self, title): self.title = title diff --git a/wcs/qommon/ident/base.py b/wcs/qommon/ident/base.py index 980ea79c9..e51314028 100644 --- a/wcs/qommon/ident/base.py +++ b/wcs/qommon/ident/base.py @@ -15,7 +15,7 @@ # along with this program; if not, see . -class AuthMethod(object): +class AuthMethod: method_admin_widget = None def is_interactive(self): diff --git a/wcs/qommon/ods.py b/wcs/qommon/ods.py index b4315bc38..64fb234c8 100644 --- a/wcs/qommon/ods.py +++ b/wcs/qommon/ods.py @@ -81,7 +81,7 @@ def get_as_string_number(value): return str(value) -class Workbook(object): +class Workbook: def __init__(self, encoding='utf-8'): self.sheets = [] self.encoding = encoding @@ -178,7 +178,7 @@ class Workbook(object): z.close() -class WorkSheet(object): +class WorkSheet: def __init__(self, workbook, name): self.cells = {} self.name = name @@ -204,7 +204,7 @@ class WorkSheet(object): return root -class WorkCell(object): +class WorkCell: def __init__(self, worksheet, value, formdata=None, data_field=None, native_value=None): self.worksheet = worksheet if value is None: diff --git a/wcs/qommon/publisher.py b/wcs/qommon/publisher.py index 878abcc5e..0c6362f85 100644 --- a/wcs/qommon/publisher.py +++ b/wcs/qommon/publisher.py @@ -72,7 +72,7 @@ class ImmediateRedirectException(Exception): self.location = location -class QommonPublisher(Publisher, object): +class QommonPublisher(Publisher): APP_NAME = None APP_DIR = None DATA_DIR = None @@ -438,7 +438,7 @@ class QommonPublisher(Publisher, object): self._app_logger = self.get_app_logger(force=True) else: - class NullLogger(object): + class NullLogger: def error(self, *args): pass diff --git a/wcs/qommon/saml2utils.py b/wcs/qommon/saml2utils.py index 5f3c3486b..9eafd5c3b 100644 --- a/wcs/qommon/saml2utils.py +++ b/wcs/qommon/saml2utils.py @@ -29,7 +29,7 @@ def bool2xs(boolean): raise TypeError() -class Metadata(object): +class Metadata: __endpoints = {'slo': 'singleLogout', 'ac': 'assertionConsumer'} def __init__(self, publisher, provider_id, config): diff --git a/wcs/qommon/sessions.py b/wcs/qommon/sessions.py index 22016bb59..17ae0b03c 100644 --- a/wcs/qommon/sessions.py +++ b/wcs/qommon/sessions.py @@ -47,7 +47,7 @@ class QommonSession(QuixoteSession): self.__remote_address = env.get('X_FORWARDED_FOR', env.get('REMOTE_ADDR')) -class CaptchaSession(object): +class CaptchaSession: MAX_CAPTCHA_TOKENS = 8 _captcha_tokens = None won_captcha = False diff --git a/wcs/qommon/sms.py b/wcs/qommon/sms.py index d70e592a0..94f45ed54 100644 --- a/wcs/qommon/sms.py +++ b/wcs/qommon/sms.py @@ -20,7 +20,7 @@ from . import get_cfg from . import get_logger -class PasserelleSMS(object): +class PasserelleSMS: TIMEOUT = 10 def __init__(self): @@ -40,7 +40,7 @@ class PasserelleSMS(object): get_logger().debug('sms %r sent using passerelle to %r, result: %r', text, destinations, data) -class SMS(object): +class SMS: @classmethod def get_sms_class(cls): sms_cfg = get_cfg('sms', {}) diff --git a/wcs/qommon/storage.py b/wcs/qommon/storage.py index ed5d09a03..12c1f0a21 100644 --- a/wcs/qommon/storage.py +++ b/wcs/qommon/storage.py @@ -139,7 +139,7 @@ def pickle_2to3_conversion(obj): obj.__dict__ = deep_bytes2str(obj.__dict__) # inplace -class Criteria(object): +class Criteria: def __init__(self, attribute, value): self.attribute = attribute self.value = value @@ -296,7 +296,7 @@ class StorageIndexException(Exception): pass -class StorableObject(object): +class StorableObject: _indexes = None _hashed_indexes = None _filename = None # None, unless must be saved to a specific location diff --git a/wcs/qommon/substitution.py b/wcs/qommon/substitution.py index 47f348ddd..2ad872ca8 100644 --- a/wcs/qommon/substitution.py +++ b/wcs/qommon/substitution.py @@ -31,7 +31,7 @@ def invalidate_substitution_cache(func): return f -class Substitutions(object): +class Substitutions: substitutions_dict = {} dynamic_sources = [] sources = None diff --git a/wcs/qommon/template.py b/wcs/qommon/template.py index 3015805ff..0208634ed 100644 --- a/wcs/qommon/template.py +++ b/wcs/qommon/template.py @@ -426,7 +426,7 @@ def render(template_name, context): return htmltext(force_str(result)) -class QommonTemplateResponse(object): +class QommonTemplateResponse: def __init__(self, templates, context): self.templates = templates self.context = context @@ -477,7 +477,7 @@ def ezt_raises(exception, on_parse=False): raise TemplateError(message % ' '.join(parts)) -class Template(object): +class Template: def __init__(self, value, raises=False, ezt_format=ezt.FORMAT_RAW, ezt_only=False, autoescape=True): '''Guess kind of template (Django or ezt), and parse it''' self.value = value diff --git a/wcs/qommon/upload_storage.py b/wcs/qommon/upload_storage.py index 1777a5b70..05b09e06d 100644 --- a/wcs/qommon/upload_storage.py +++ b/wcs/qommon/upload_storage.py @@ -103,7 +103,7 @@ class UploadStorageError(Exception): pass -class UploadStorage(object): +class UploadStorage: def save_tempfile(self, upload): upload.__class__ = PicklableUpload dirname = os.path.join(get_publisher().app_dir, 'tempfiles') @@ -158,7 +158,7 @@ class UploadStorage(object): raise AssertionError('no get_redirect_url on UploadStorage object') -class RemoteOpaqueUploadStorage(object): +class RemoteOpaqueUploadStorage: def __init__(self, ws, frontoffice_redirect='true', backoffice_redirect='true', **kwargs): self.ws = ws self.frontoffice_redirect = bool(frontoffice_redirect == 'true') diff --git a/wcs/qommon/vendor/locket.py b/wcs/qommon/vendor/locket.py index 1294f0fc4..9d5aac452 100644 --- a/wcs/qommon/vendor/locket.py +++ b/wcs/qommon/vendor/locket.py @@ -101,7 +101,7 @@ def _acquire_non_blocking(acquire, timeout, retry_period, path): time.sleep(retry_period) -class _LockSet(object): +class _LockSet: def __init__(self, locks): self._locks = locks @@ -130,7 +130,7 @@ class _LockSet(object): self.release() -class _ThreadLock(object): +class _ThreadLock: def __init__(self, path, timeout=None, retry_period=None): self._path = path self._timeout = timeout @@ -152,7 +152,7 @@ class _ThreadLock(object): self._lock.release() -class _LockFile(object): +class _LockFile: def __init__(self, path, timeout=None, retry_period=None): self._path = path self._timeout = timeout diff --git a/wcs/scripts.py b/wcs/scripts.py index 827c87896..2473809f1 100644 --- a/wcs/scripts.py +++ b/wcs/scripts.py @@ -20,7 +20,7 @@ import os from quixote import get_publisher -class Script(object): +class Script: ezt_call_mode = 'simple' def __init__(self, script_name): @@ -56,7 +56,7 @@ class Script(object): return data.get('result') -class ScriptsSubstitutionProxy(object): +class ScriptsSubstitutionProxy: def __getattr__(self, attr): try: return Script(attr) diff --git a/wcs/sql.py b/wcs/sql.py index 26352bf28..48a494618 100644 --- a/wcs/sql.py +++ b/wcs/sql.py @@ -1374,7 +1374,7 @@ def do_global_views(conn, cur): ) -class SqlMixin(object): +class SqlMixin: _table_name = None _numerical_id = True _table_select_skipped_fields = [] @@ -3024,7 +3024,7 @@ class LoggedError(SqlMixin, wcs.logged_errors.LoggedError): cur.close() -class classproperty(object): +class classproperty: def __init__(self, f): self.f = f diff --git a/wcs/variables.py b/wcs/variables.py index 8c52e97b9..5fa07a7b3 100644 --- a/wcs/variables.py +++ b/wcs/variables.py @@ -36,7 +36,7 @@ from .qommon.substitution import CompatibilityNamesDict from .qommon.templatetags.qommon import parse_datetime -class LazyFormDefObjectsManager(object): +class LazyFormDefObjectsManager: def __init__( self, formdef, formdata=None, geoloc_center_formdata=None, criterias=None, order_by=None, limit=None ): @@ -255,7 +255,7 @@ class LazyFormDefObjectsManager(object): return any(self) -class LazyList(object): +class LazyList: def __init__(self, lazy_manager, key): self._lazy_manager = lazy_manager self._key = key @@ -304,7 +304,7 @@ class LazyList(object): return list(self) == list(other) -class LazyFormDef(object): +class LazyFormDef: def __init__(self, formdef): self._formdef = formdef @@ -613,7 +613,7 @@ class LazyFormData(LazyFormDef): raise -class LazyFormDataVar(object): +class LazyFormDataVar: def __init__(self, fields, data, formdata=None): self._fields = fields self._data = data or {} @@ -701,7 +701,7 @@ class LazyFormDataVar(object): raise AttributeError(attr) -class LazyFieldVar(object): +class LazyFieldVar: def __init__(self, data, field, formdata=None, **kwargs): self._data = data self._field = field @@ -876,7 +876,7 @@ class LazyFieldVarStructured(LazyFieldVar): raise KeyError(key) -class DateOperatorsMixin(object): +class DateOperatorsMixin: def __eq__(self, other): if hasattr(other, 'timetuple'): other = other.timetuple() @@ -1077,7 +1077,7 @@ class LazyFieldVarBlock(LazyFieldVar): return [data.get(field.id) for data in self._formdata.data.get(self._field.id)['data']] -class LazyUser(object): +class LazyUser: def __init__(self, user): self._user = user @@ -1125,7 +1125,7 @@ class LazyUser(object): return getattr(self._user, attr) -class LazyRequest(object): +class LazyRequest: def __init__(self, request): self._request = request diff --git a/wcs/wf/create_formdata.py b/wcs/wf/create_formdata.py index b60c4a3a5..668a9da7d 100644 --- a/wcs/wf/create_formdata.py +++ b/wcs/wf/create_formdata.py @@ -39,7 +39,7 @@ from wcs.workflows import WorkflowStatusItem from wcs.workflows import register_item_class -class Mapping(object): +class Mapping: field_id = None expression = None @@ -131,7 +131,7 @@ class MappingsWidget(WidgetListAsTable): self.value.sort(key=lambda mapping: self.ranks.get(str(mapping.field_id), 9999)) -class LinkedFormdataEvolutionPart(object): +class LinkedFormdataEvolutionPart: formdef_class = FormDef attach_to_history = False @@ -187,7 +187,7 @@ class LinkedFormdataEvolutionPart(object): return '' -class LazyFormDataLinks(object): +class LazyFormDataLinks: def __init__(self, formdata): self._formdata = formdata diff --git a/wcs/workflows.py b/wcs/workflows.py index cdead823e..f2fe2ff58 100644 --- a/wcs/workflows.py +++ b/wcs/workflows.py @@ -133,7 +133,7 @@ class AbortActionException(Exception): pass -class AttachmentSubstitutionProxy(object): +class AttachmentSubstitutionProxy: def __init__(self, formdata, attachment_evolution_part): self.formdata = formdata self.attachment_evolution_part = attachment_evolution_part @@ -165,7 +165,7 @@ class AttachmentSubstitutionProxy(object): ) -class NamedAttachmentsSubstitutionProxy(object): +class NamedAttachmentsSubstitutionProxy: def __init__(self, formdata, parts): self.formdata = formdata self.parts = parts[:] @@ -181,7 +181,7 @@ class NamedAttachmentsSubstitutionProxy(object): return AttachmentSubstitutionProxy(self.formdata, self.parts[i]) -class AttachmentsSubstitutionProxy(object): +class AttachmentsSubstitutionProxy: def __init__(self, formdata): self.formdata = formdata @@ -940,7 +940,7 @@ class Workflow(StorableObject): return list(CardDef.select(lambda x: x.workflow_id == self.id, **kwargs)) -class XmlSerialisable(object): +class XmlSerialisable: node_name = None key = None @@ -1132,7 +1132,7 @@ class WorkflowGlobalActionManualTrigger(WorkflowGlobalActionTrigger): self._roles_init_with_xml('roles', elem, charset, include_id=include_id, snapshot=snapshot) -class WorkflowGlobalActionTimeoutTriggerMarker(object): +class WorkflowGlobalActionTimeoutTriggerMarker: def __init__(self, timeout_id): self.timeout_id = timeout_id @@ -1469,7 +1469,7 @@ class WorkflowGlobalActionWebserviceTrigger(WorkflowGlobalActionManualTrigger): return [('hooks', WorkflowGlobalActionWebserviceHooksDirectory(formdata))] -class WorkflowGlobalAction(object): +class WorkflowGlobalAction: id = None name = None items = None @@ -1549,7 +1549,7 @@ class WorkflowGlobalAction(object): trigger_o.init_with_xml(trigger, charset, include_id=include_id, snapshot=snapshot) -class WorkflowCriticalityLevel(object): +class WorkflowCriticalityLevel: id = None name = None colour = None @@ -1574,7 +1574,7 @@ class WorkflowCriticalityLevel(object): self.colour = xml_node_text(elem.find('colour')) -class WorkflowStatus(object): +class WorkflowStatus: id = None name = None items = None diff --git a/wcs/wscalls.py b/wcs/wscalls.py index 1132bf1f6..96447dfea 100644 --- a/wcs/wscalls.py +++ b/wcs/wscalls.py @@ -277,7 +277,7 @@ class NamedWsCall(XmlStorableObject): return json_loads(data) -class WsCallsSubstitutionProxy(object): +class WsCallsSubstitutionProxy: def __getattr__(self, attr): try: return NamedWsCall.get(attr).call()