misc: pylint fix useless-object-inheritance (#52222)
This commit is contained in:
parent
edab61d227
commit
f21431cb8a
|
@ -33,7 +33,7 @@ from wcs.qommon.form import StringWidget
|
||||||
from wcs.qommon.form import TextWidget
|
from wcs.qommon.form import TextWidget
|
||||||
|
|
||||||
|
|
||||||
class ApiAccessUI(object):
|
class ApiAccessUI:
|
||||||
def __init__(self, api_access):
|
def __init__(self, api_access):
|
||||||
self.api_access = api_access
|
self.api_access = api_access
|
||||||
if self.api_access is None:
|
if self.api_access is None:
|
||||||
|
|
|
@ -34,7 +34,7 @@ from wcs.qommon.form import StringWidget
|
||||||
from wcs.qommon.form import WysiwygTextWidget
|
from wcs.qommon.form import WysiwygTextWidget
|
||||||
|
|
||||||
|
|
||||||
class CategoryUI(object):
|
class CategoryUI:
|
||||||
category_class = Category
|
category_class = Category
|
||||||
|
|
||||||
def __init__(self, category):
|
def __init__(self, category):
|
||||||
|
|
|
@ -48,7 +48,7 @@ from wcs.qommon.form import get_response
|
||||||
from wcs.qommon.form import get_session
|
from wcs.qommon.form import get_session
|
||||||
|
|
||||||
|
|
||||||
class NamedDataSourceUI(object):
|
class NamedDataSourceUI:
|
||||||
def __init__(self, datasource):
|
def __init__(self, datasource):
|
||||||
self.datasource = datasource
|
self.datasource = datasource
|
||||||
if self.datasource is None:
|
if self.datasource is None:
|
||||||
|
|
|
@ -86,7 +86,7 @@ def get_categories(category_class):
|
||||||
return [x[1:] for x in t]
|
return [x[1:] for x in t]
|
||||||
|
|
||||||
|
|
||||||
class FormDefUI(object):
|
class FormDefUI:
|
||||||
formdef_class = FormDef
|
formdef_class = FormDef
|
||||||
category_class = Category
|
category_class = Category
|
||||||
|
|
||||||
|
@ -1521,7 +1521,7 @@ class FormDefPage(Directory):
|
||||||
return self.archive_submit(form)
|
return self.archive_submit(form)
|
||||||
|
|
||||||
def archive_submit(self, form):
|
def archive_submit(self, form):
|
||||||
class Archiver(object):
|
class Archiver:
|
||||||
def __init__(self, formdef):
|
def __init__(self, formdef):
|
||||||
self.formdef = formdef
|
self.formdef = formdef
|
||||||
|
|
||||||
|
@ -1625,7 +1625,7 @@ class FormDefPage(Directory):
|
||||||
return self.anonymise_submit(form)
|
return self.anonymise_submit(form)
|
||||||
|
|
||||||
def anonymise_submit(self, form):
|
def anonymise_submit(self, form):
|
||||||
class Anonymiser(object):
|
class Anonymiser:
|
||||||
def __init__(self, formdef, status_ids, before_date):
|
def __init__(self, formdef, status_ids, before_date):
|
||||||
self.formdef = formdef
|
self.formdef = formdef
|
||||||
self.status_ids = ["wf-%s" % id for id in status_ids]
|
self.status_ids = ["wf-%s" % id for id in status_ids]
|
||||||
|
|
|
@ -35,7 +35,7 @@ from wcs.qommon.form import WidgetList
|
||||||
from wcs.roles import get_user_roles
|
from wcs.roles import get_user_roles
|
||||||
|
|
||||||
|
|
||||||
class RoleUI(object):
|
class RoleUI:
|
||||||
def __init__(self, role):
|
def __init__(self, role):
|
||||||
self.role = role
|
self.role = role
|
||||||
if self.role is None:
|
if self.role is None:
|
||||||
|
|
|
@ -1005,7 +1005,7 @@ class SettingsDirectory(QommonSettingsDirectory):
|
||||||
r += form.render()
|
r += form.render()
|
||||||
return r.getvalue()
|
return r.getvalue()
|
||||||
|
|
||||||
class Exporter(object):
|
class Exporter:
|
||||||
def __init__(self, dirs, settings):
|
def __init__(self, dirs, settings):
|
||||||
self.app_dir = get_publisher().app_dir
|
self.app_dir = get_publisher().app_dir
|
||||||
self.dirs = dirs
|
self.dirs = dirs
|
||||||
|
|
|
@ -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
|
from wcs.qommon.ident.idp import is_idp_managing_user_roles
|
||||||
|
|
||||||
|
|
||||||
class UserUI(object):
|
class UserUI:
|
||||||
def __init__(self, user):
|
def __init__(self, user):
|
||||||
self.user = user
|
self.user = user
|
||||||
|
|
||||||
|
|
|
@ -301,7 +301,7 @@ def graphviz(workflow, url_prefix='', select=None, svg=True, include=False):
|
||||||
return out
|
return out
|
||||||
|
|
||||||
|
|
||||||
class WorkflowUI(object):
|
class WorkflowUI:
|
||||||
def __init__(self, workflow):
|
def __init__(self, workflow):
|
||||||
self.workflow = workflow
|
self.workflow = workflow
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ from wcs.wscalls import NamedWsCall
|
||||||
from wcs.wscalls import WsCallRequestWidget
|
from wcs.wscalls import WsCallRequestWidget
|
||||||
|
|
||||||
|
|
||||||
class NamedWsCallUI(object):
|
class NamedWsCallUI:
|
||||||
def __init__(self, wscall):
|
def __init__(self, wscall):
|
||||||
self.wscall = wscall
|
self.wscall = wscall
|
||||||
if self.wscall is None:
|
if self.wscall is None:
|
||||||
|
|
|
@ -3370,7 +3370,7 @@ class FormBackOfficeStatusPage(FormStatusPage):
|
||||||
return self.test_tool_result()
|
return self.test_tool_result()
|
||||||
|
|
||||||
|
|
||||||
class FakeField(object):
|
class FakeField:
|
||||||
def __init__(self, id, type_, label, addable=True):
|
def __init__(self, id, type_, label, addable=True):
|
||||||
self.id = id
|
self.id = id
|
||||||
self.type = type_
|
self.type = type_
|
||||||
|
|
|
@ -20,7 +20,7 @@ from django.utils.module_loading import import_string
|
||||||
from quixote import get_publisher
|
from quixote import get_publisher
|
||||||
|
|
||||||
|
|
||||||
class TenantBaseCache(object):
|
class TenantBaseCache:
|
||||||
'''Prepend the tenant application directory to the cache prefix'''
|
'''Prepend the tenant application directory to the cache prefix'''
|
||||||
|
|
||||||
def set_key_prefix(self, prefix):
|
def set_key_prefix(self, prefix):
|
||||||
|
|
|
@ -30,7 +30,7 @@ class ValidationError(ValueError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class Condition(object):
|
class Condition:
|
||||||
record_errors = True
|
record_errors = True
|
||||||
log_errors = False
|
log_errors = False
|
||||||
|
|
||||||
|
|
|
@ -810,7 +810,7 @@ class StubNamedDataSource(NamedDataSource):
|
||||||
return '<StubNamedDataSource %r>' % self.name
|
return '<StubNamedDataSource %r>' % self.name
|
||||||
|
|
||||||
|
|
||||||
class DataSourcesSubstitutionProxy(object):
|
class DataSourcesSubstitutionProxy:
|
||||||
def __getattr__(self, attr):
|
def __getattr__(self, attr):
|
||||||
return get_structured_items(NamedDataSource.get_by_slug(attr).data_source)
|
return get_structured_items(NamedDataSource.get_by_slug(attr).data_source)
|
||||||
|
|
||||||
|
|
|
@ -248,7 +248,7 @@ class PrefillSelectionWidget(CompositeWidget):
|
||||||
return r.getvalue()
|
return r.getvalue()
|
||||||
|
|
||||||
|
|
||||||
class Field(object):
|
class Field:
|
||||||
id = None
|
id = None
|
||||||
type = None
|
type = None
|
||||||
varname = None
|
varname = None
|
||||||
|
@ -1762,7 +1762,7 @@ class MapOptionsMixin:
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class ItemFieldMixin(object):
|
class ItemFieldMixin:
|
||||||
def add_items_fields_admin_form(self, form):
|
def add_items_fields_admin_form(self, form):
|
||||||
real_data_source = data_sources.get_real(self.data_source)
|
real_data_source = data_sources.get_real(self.data_source)
|
||||||
form.add(
|
form.add(
|
||||||
|
@ -2444,7 +2444,7 @@ class PageCondition(Condition):
|
||||||
# 1) feed the form_var_* variables in the global substitution system,
|
# 1) feed the form_var_* variables in the global substitution system,
|
||||||
# they will shadow formdata context variables with their new "live"
|
# they will shadow formdata context variables with their new "live"
|
||||||
# value, this may be useful when evaluating data sources.
|
# value, this may be useful when evaluating data sources.
|
||||||
class ConditionVars(object):
|
class ConditionVars:
|
||||||
def __init__(self, id_dict_var):
|
def __init__(self, id_dict_var):
|
||||||
# keep track of reference dictionary
|
# keep track of reference dictionary
|
||||||
self.id_dict_var = id_dict_var
|
self.id_dict_var = id_dict_var
|
||||||
|
|
|
@ -112,7 +112,7 @@ def flatten_dict(d):
|
||||||
del d[k]
|
del d[k]
|
||||||
|
|
||||||
|
|
||||||
class Evolution(object):
|
class Evolution:
|
||||||
who = None
|
who = None
|
||||||
status = None
|
status = None
|
||||||
time = None
|
time = None
|
||||||
|
|
|
@ -77,7 +77,7 @@ class FormdefImportRecoverableError(FormdefImportError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class FormField(object):
|
class FormField:
|
||||||
# only used to unpickle form fields from older (<200603) versions
|
# only used to unpickle form fields from older (<200603) versions
|
||||||
def __setstate__(self, dict):
|
def __setstate__(self, dict):
|
||||||
type = dict['type']
|
type = dict['type']
|
||||||
|
@ -1523,7 +1523,7 @@ class FormDef(StorableObject):
|
||||||
if changed:
|
if changed:
|
||||||
formdef.store()
|
formdef.store()
|
||||||
|
|
||||||
class _EmptyClass(object): # helper for instance creation without calling __init__
|
class _EmptyClass: # helper for instance creation without calling __init__
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def __copy__(self, memo=None, deepcopy=False):
|
def __copy__(self, memo=None, deepcopy=False):
|
||||||
|
|
|
@ -31,7 +31,7 @@ from ..qommon import misc
|
||||||
from ..qommon.backoffice.listing import pagination_links
|
from ..qommon.backoffice.listing import pagination_links
|
||||||
|
|
||||||
|
|
||||||
class FormDefUI(object):
|
class FormDefUI:
|
||||||
def __init__(self, formdef):
|
def __init__(self, formdef):
|
||||||
self.formdef = formdef
|
self.formdef = formdef
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,7 @@ class FilesDirectory(Directory):
|
||||||
return FileDirectory(self.formdata, reference=component)
|
return FileDirectory(self.formdata, reference=component)
|
||||||
|
|
||||||
|
|
||||||
class FormTemplateMixin(object):
|
class FormTemplateMixin:
|
||||||
def get_formdef_template_variants(self, template_names):
|
def get_formdef_template_variants(self, template_names):
|
||||||
template_part_names = [(os.path.dirname(x), os.path.basename(x)) for x in 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:
|
for dirname, basename in template_part_names:
|
||||||
|
|
|
@ -23,7 +23,7 @@ from wcs.workflows import Workflow
|
||||||
from .qommon.misc import simplify
|
from .qommon.misc import simplify
|
||||||
|
|
||||||
|
|
||||||
class LoggedError(object):
|
class LoggedError:
|
||||||
_names = 'logged-errors'
|
_names = 'logged-errors'
|
||||||
|
|
||||||
id = None
|
id = None
|
||||||
|
|
|
@ -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
|
# 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.
|
# context; so we do it in the constructor.
|
||||||
class fargo_post_json_async(object):
|
class fargo_post_json_async:
|
||||||
def __init__(self, url, payload):
|
def __init__(self, url, payload):
|
||||||
self.url = fargo_url(url)
|
self.url = fargo_url(url)
|
||||||
self.payload = payload
|
self.payload = payload
|
||||||
|
|
|
@ -19,7 +19,7 @@ import sys
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
|
|
||||||
class CronJob(object):
|
class CronJob:
|
||||||
name = None
|
name = None
|
||||||
hours = None
|
hours = None
|
||||||
minutes = None
|
minutes = None
|
||||||
|
|
|
@ -33,7 +33,7 @@ from . import _
|
||||||
qommon._commands = {}
|
qommon._commands = {}
|
||||||
|
|
||||||
|
|
||||||
class Command(object):
|
class Command:
|
||||||
doc = ''
|
doc = ''
|
||||||
name = None
|
name = None
|
||||||
usage_args = '[ options ... ]'
|
usage_args = '[ options ... ]'
|
||||||
|
@ -88,7 +88,7 @@ class Command(object):
|
||||||
qommon._commands[cls.name] = cls
|
qommon._commands[cls.name] = cls
|
||||||
|
|
||||||
|
|
||||||
class Ctl(object):
|
class Ctl:
|
||||||
def __init__(self, cmd_prefixes=None):
|
def __init__(self, cmd_prefixes=None):
|
||||||
self.cmd_prefixes = cmd_prefixes or []
|
self.cmd_prefixes = cmd_prefixes or []
|
||||||
self.parser = optparse.OptionParser(
|
self.parser = optparse.OptionParser(
|
||||||
|
|
|
@ -392,7 +392,7 @@ def create_smtp_server(emails_cfg, smtp_timeout=None):
|
||||||
return s
|
return s
|
||||||
|
|
||||||
|
|
||||||
class EmailToSend(object):
|
class EmailToSend:
|
||||||
def __init__(self, msg_from, rcpts, msg, smtp_timeout):
|
def __init__(self, msg_from, rcpts, msg, smtp_timeout):
|
||||||
self.msg_from = msg_from
|
self.msg_from = msg_from
|
||||||
self.rcpts = rcpts
|
self.rcpts = rcpts
|
||||||
|
|
|
@ -80,7 +80,7 @@ class EmailError(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class InternalServerError(object):
|
class InternalServerError:
|
||||||
def render(self):
|
def render(self):
|
||||||
from . import _
|
from . import _
|
||||||
|
|
||||||
|
|
|
@ -498,7 +498,7 @@ class Form(QuixoteForm):
|
||||||
widget.add_media()
|
widget.add_media()
|
||||||
|
|
||||||
|
|
||||||
class HtmlWidget(object):
|
class HtmlWidget:
|
||||||
error = None
|
error = None
|
||||||
name = None
|
name = None
|
||||||
|
|
||||||
|
@ -996,7 +996,7 @@ class EmailWidget(StringWidget):
|
||||||
self.error = _('invalid address domain')
|
self.error = _('invalid address domain')
|
||||||
|
|
||||||
|
|
||||||
class OptGroup(object):
|
class OptGroup:
|
||||||
def __init__(self, title):
|
def __init__(self, title):
|
||||||
self.title = title
|
self.title = title
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
class AuthMethod(object):
|
class AuthMethod:
|
||||||
method_admin_widget = None
|
method_admin_widget = None
|
||||||
|
|
||||||
def is_interactive(self):
|
def is_interactive(self):
|
||||||
|
|
|
@ -81,7 +81,7 @@ def get_as_string_number(value):
|
||||||
return str(value)
|
return str(value)
|
||||||
|
|
||||||
|
|
||||||
class Workbook(object):
|
class Workbook:
|
||||||
def __init__(self, encoding='utf-8'):
|
def __init__(self, encoding='utf-8'):
|
||||||
self.sheets = []
|
self.sheets = []
|
||||||
self.encoding = encoding
|
self.encoding = encoding
|
||||||
|
@ -178,7 +178,7 @@ class Workbook(object):
|
||||||
z.close()
|
z.close()
|
||||||
|
|
||||||
|
|
||||||
class WorkSheet(object):
|
class WorkSheet:
|
||||||
def __init__(self, workbook, name):
|
def __init__(self, workbook, name):
|
||||||
self.cells = {}
|
self.cells = {}
|
||||||
self.name = name
|
self.name = name
|
||||||
|
@ -204,7 +204,7 @@ class WorkSheet(object):
|
||||||
return root
|
return root
|
||||||
|
|
||||||
|
|
||||||
class WorkCell(object):
|
class WorkCell:
|
||||||
def __init__(self, worksheet, value, formdata=None, data_field=None, native_value=None):
|
def __init__(self, worksheet, value, formdata=None, data_field=None, native_value=None):
|
||||||
self.worksheet = worksheet
|
self.worksheet = worksheet
|
||||||
if value is None:
|
if value is None:
|
||||||
|
|
|
@ -72,7 +72,7 @@ class ImmediateRedirectException(Exception):
|
||||||
self.location = location
|
self.location = location
|
||||||
|
|
||||||
|
|
||||||
class QommonPublisher(Publisher, object):
|
class QommonPublisher(Publisher):
|
||||||
APP_NAME = None
|
APP_NAME = None
|
||||||
APP_DIR = None
|
APP_DIR = None
|
||||||
DATA_DIR = None
|
DATA_DIR = None
|
||||||
|
@ -438,7 +438,7 @@ class QommonPublisher(Publisher, object):
|
||||||
self._app_logger = self.get_app_logger(force=True)
|
self._app_logger = self.get_app_logger(force=True)
|
||||||
else:
|
else:
|
||||||
|
|
||||||
class NullLogger(object):
|
class NullLogger:
|
||||||
def error(self, *args):
|
def error(self, *args):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ def bool2xs(boolean):
|
||||||
raise TypeError()
|
raise TypeError()
|
||||||
|
|
||||||
|
|
||||||
class Metadata(object):
|
class Metadata:
|
||||||
__endpoints = {'slo': 'singleLogout', 'ac': 'assertionConsumer'}
|
__endpoints = {'slo': 'singleLogout', 'ac': 'assertionConsumer'}
|
||||||
|
|
||||||
def __init__(self, publisher, provider_id, config):
|
def __init__(self, publisher, provider_id, config):
|
||||||
|
|
|
@ -47,7 +47,7 @@ class QommonSession(QuixoteSession):
|
||||||
self.__remote_address = env.get('X_FORWARDED_FOR', env.get('REMOTE_ADDR'))
|
self.__remote_address = env.get('X_FORWARDED_FOR', env.get('REMOTE_ADDR'))
|
||||||
|
|
||||||
|
|
||||||
class CaptchaSession(object):
|
class CaptchaSession:
|
||||||
MAX_CAPTCHA_TOKENS = 8
|
MAX_CAPTCHA_TOKENS = 8
|
||||||
_captcha_tokens = None
|
_captcha_tokens = None
|
||||||
won_captcha = False
|
won_captcha = False
|
||||||
|
|
|
@ -20,7 +20,7 @@ from . import get_cfg
|
||||||
from . import get_logger
|
from . import get_logger
|
||||||
|
|
||||||
|
|
||||||
class PasserelleSMS(object):
|
class PasserelleSMS:
|
||||||
TIMEOUT = 10
|
TIMEOUT = 10
|
||||||
|
|
||||||
def __init__(self):
|
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)
|
get_logger().debug('sms %r sent using passerelle to %r, result: %r', text, destinations, data)
|
||||||
|
|
||||||
|
|
||||||
class SMS(object):
|
class SMS:
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_sms_class(cls):
|
def get_sms_class(cls):
|
||||||
sms_cfg = get_cfg('sms', {})
|
sms_cfg = get_cfg('sms', {})
|
||||||
|
|
|
@ -139,7 +139,7 @@ def pickle_2to3_conversion(obj):
|
||||||
obj.__dict__ = deep_bytes2str(obj.__dict__) # inplace
|
obj.__dict__ = deep_bytes2str(obj.__dict__) # inplace
|
||||||
|
|
||||||
|
|
||||||
class Criteria(object):
|
class Criteria:
|
||||||
def __init__(self, attribute, value):
|
def __init__(self, attribute, value):
|
||||||
self.attribute = attribute
|
self.attribute = attribute
|
||||||
self.value = value
|
self.value = value
|
||||||
|
@ -296,7 +296,7 @@ class StorageIndexException(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class StorableObject(object):
|
class StorableObject:
|
||||||
_indexes = None
|
_indexes = None
|
||||||
_hashed_indexes = None
|
_hashed_indexes = None
|
||||||
_filename = None # None, unless must be saved to a specific location
|
_filename = None # None, unless must be saved to a specific location
|
||||||
|
|
|
@ -31,7 +31,7 @@ def invalidate_substitution_cache(func):
|
||||||
return f
|
return f
|
||||||
|
|
||||||
|
|
||||||
class Substitutions(object):
|
class Substitutions:
|
||||||
substitutions_dict = {}
|
substitutions_dict = {}
|
||||||
dynamic_sources = []
|
dynamic_sources = []
|
||||||
sources = None
|
sources = None
|
||||||
|
|
|
@ -426,7 +426,7 @@ def render(template_name, context):
|
||||||
return htmltext(force_str(result))
|
return htmltext(force_str(result))
|
||||||
|
|
||||||
|
|
||||||
class QommonTemplateResponse(object):
|
class QommonTemplateResponse:
|
||||||
def __init__(self, templates, context):
|
def __init__(self, templates, context):
|
||||||
self.templates = templates
|
self.templates = templates
|
||||||
self.context = context
|
self.context = context
|
||||||
|
@ -477,7 +477,7 @@ def ezt_raises(exception, on_parse=False):
|
||||||
raise TemplateError(message % ' '.join(parts))
|
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):
|
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'''
|
'''Guess kind of template (Django or ezt), and parse it'''
|
||||||
self.value = value
|
self.value = value
|
||||||
|
|
|
@ -103,7 +103,7 @@ class UploadStorageError(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class UploadStorage(object):
|
class UploadStorage:
|
||||||
def save_tempfile(self, upload):
|
def save_tempfile(self, upload):
|
||||||
upload.__class__ = PicklableUpload
|
upload.__class__ = PicklableUpload
|
||||||
dirname = os.path.join(get_publisher().app_dir, 'tempfiles')
|
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')
|
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):
|
def __init__(self, ws, frontoffice_redirect='true', backoffice_redirect='true', **kwargs):
|
||||||
self.ws = ws
|
self.ws = ws
|
||||||
self.frontoffice_redirect = bool(frontoffice_redirect == 'true')
|
self.frontoffice_redirect = bool(frontoffice_redirect == 'true')
|
||||||
|
|
|
@ -101,7 +101,7 @@ def _acquire_non_blocking(acquire, timeout, retry_period, path):
|
||||||
time.sleep(retry_period)
|
time.sleep(retry_period)
|
||||||
|
|
||||||
|
|
||||||
class _LockSet(object):
|
class _LockSet:
|
||||||
def __init__(self, locks):
|
def __init__(self, locks):
|
||||||
self._locks = locks
|
self._locks = locks
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ class _LockSet(object):
|
||||||
self.release()
|
self.release()
|
||||||
|
|
||||||
|
|
||||||
class _ThreadLock(object):
|
class _ThreadLock:
|
||||||
def __init__(self, path, timeout=None, retry_period=None):
|
def __init__(self, path, timeout=None, retry_period=None):
|
||||||
self._path = path
|
self._path = path
|
||||||
self._timeout = timeout
|
self._timeout = timeout
|
||||||
|
@ -152,7 +152,7 @@ class _ThreadLock(object):
|
||||||
self._lock.release()
|
self._lock.release()
|
||||||
|
|
||||||
|
|
||||||
class _LockFile(object):
|
class _LockFile:
|
||||||
def __init__(self, path, timeout=None, retry_period=None):
|
def __init__(self, path, timeout=None, retry_period=None):
|
||||||
self._path = path
|
self._path = path
|
||||||
self._timeout = timeout
|
self._timeout = timeout
|
||||||
|
|
|
@ -20,7 +20,7 @@ import os
|
||||||
from quixote import get_publisher
|
from quixote import get_publisher
|
||||||
|
|
||||||
|
|
||||||
class Script(object):
|
class Script:
|
||||||
ezt_call_mode = 'simple'
|
ezt_call_mode = 'simple'
|
||||||
|
|
||||||
def __init__(self, script_name):
|
def __init__(self, script_name):
|
||||||
|
@ -56,7 +56,7 @@ class Script(object):
|
||||||
return data.get('result')
|
return data.get('result')
|
||||||
|
|
||||||
|
|
||||||
class ScriptsSubstitutionProxy(object):
|
class ScriptsSubstitutionProxy:
|
||||||
def __getattr__(self, attr):
|
def __getattr__(self, attr):
|
||||||
try:
|
try:
|
||||||
return Script(attr)
|
return Script(attr)
|
||||||
|
|
|
@ -1374,7 +1374,7 @@ def do_global_views(conn, cur):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class SqlMixin(object):
|
class SqlMixin:
|
||||||
_table_name = None
|
_table_name = None
|
||||||
_numerical_id = True
|
_numerical_id = True
|
||||||
_table_select_skipped_fields = []
|
_table_select_skipped_fields = []
|
||||||
|
@ -3024,7 +3024,7 @@ class LoggedError(SqlMixin, wcs.logged_errors.LoggedError):
|
||||||
cur.close()
|
cur.close()
|
||||||
|
|
||||||
|
|
||||||
class classproperty(object):
|
class classproperty:
|
||||||
def __init__(self, f):
|
def __init__(self, f):
|
||||||
self.f = f
|
self.f = f
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ from .qommon.substitution import CompatibilityNamesDict
|
||||||
from .qommon.templatetags.qommon import parse_datetime
|
from .qommon.templatetags.qommon import parse_datetime
|
||||||
|
|
||||||
|
|
||||||
class LazyFormDefObjectsManager(object):
|
class LazyFormDefObjectsManager:
|
||||||
def __init__(
|
def __init__(
|
||||||
self, formdef, formdata=None, geoloc_center_formdata=None, criterias=None, order_by=None, limit=None
|
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)
|
return any(self)
|
||||||
|
|
||||||
|
|
||||||
class LazyList(object):
|
class LazyList:
|
||||||
def __init__(self, lazy_manager, key):
|
def __init__(self, lazy_manager, key):
|
||||||
self._lazy_manager = lazy_manager
|
self._lazy_manager = lazy_manager
|
||||||
self._key = key
|
self._key = key
|
||||||
|
@ -304,7 +304,7 @@ class LazyList(object):
|
||||||
return list(self) == list(other)
|
return list(self) == list(other)
|
||||||
|
|
||||||
|
|
||||||
class LazyFormDef(object):
|
class LazyFormDef:
|
||||||
def __init__(self, formdef):
|
def __init__(self, formdef):
|
||||||
self._formdef = formdef
|
self._formdef = formdef
|
||||||
|
|
||||||
|
@ -613,7 +613,7 @@ class LazyFormData(LazyFormDef):
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
||||||
class LazyFormDataVar(object):
|
class LazyFormDataVar:
|
||||||
def __init__(self, fields, data, formdata=None):
|
def __init__(self, fields, data, formdata=None):
|
||||||
self._fields = fields
|
self._fields = fields
|
||||||
self._data = data or {}
|
self._data = data or {}
|
||||||
|
@ -701,7 +701,7 @@ class LazyFormDataVar(object):
|
||||||
raise AttributeError(attr)
|
raise AttributeError(attr)
|
||||||
|
|
||||||
|
|
||||||
class LazyFieldVar(object):
|
class LazyFieldVar:
|
||||||
def __init__(self, data, field, formdata=None, **kwargs):
|
def __init__(self, data, field, formdata=None, **kwargs):
|
||||||
self._data = data
|
self._data = data
|
||||||
self._field = field
|
self._field = field
|
||||||
|
@ -876,7 +876,7 @@ class LazyFieldVarStructured(LazyFieldVar):
|
||||||
raise KeyError(key)
|
raise KeyError(key)
|
||||||
|
|
||||||
|
|
||||||
class DateOperatorsMixin(object):
|
class DateOperatorsMixin:
|
||||||
def __eq__(self, other):
|
def __eq__(self, other):
|
||||||
if hasattr(other, 'timetuple'):
|
if hasattr(other, 'timetuple'):
|
||||||
other = 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']]
|
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):
|
def __init__(self, user):
|
||||||
self._user = user
|
self._user = user
|
||||||
|
|
||||||
|
@ -1125,7 +1125,7 @@ class LazyUser(object):
|
||||||
return getattr(self._user, attr)
|
return getattr(self._user, attr)
|
||||||
|
|
||||||
|
|
||||||
class LazyRequest(object):
|
class LazyRequest:
|
||||||
def __init__(self, request):
|
def __init__(self, request):
|
||||||
self._request = request
|
self._request = request
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ from wcs.workflows import WorkflowStatusItem
|
||||||
from wcs.workflows import register_item_class
|
from wcs.workflows import register_item_class
|
||||||
|
|
||||||
|
|
||||||
class Mapping(object):
|
class Mapping:
|
||||||
field_id = None
|
field_id = None
|
||||||
expression = None
|
expression = None
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ class MappingsWidget(WidgetListAsTable):
|
||||||
self.value.sort(key=lambda mapping: self.ranks.get(str(mapping.field_id), 9999))
|
self.value.sort(key=lambda mapping: self.ranks.get(str(mapping.field_id), 9999))
|
||||||
|
|
||||||
|
|
||||||
class LinkedFormdataEvolutionPart(object):
|
class LinkedFormdataEvolutionPart:
|
||||||
formdef_class = FormDef
|
formdef_class = FormDef
|
||||||
attach_to_history = False
|
attach_to_history = False
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ class LinkedFormdataEvolutionPart(object):
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
|
||||||
class LazyFormDataLinks(object):
|
class LazyFormDataLinks:
|
||||||
def __init__(self, formdata):
|
def __init__(self, formdata):
|
||||||
self._formdata = formdata
|
self._formdata = formdata
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ class AbortActionException(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class AttachmentSubstitutionProxy(object):
|
class AttachmentSubstitutionProxy:
|
||||||
def __init__(self, formdata, attachment_evolution_part):
|
def __init__(self, formdata, attachment_evolution_part):
|
||||||
self.formdata = formdata
|
self.formdata = formdata
|
||||||
self.attachment_evolution_part = attachment_evolution_part
|
self.attachment_evolution_part = attachment_evolution_part
|
||||||
|
@ -165,7 +165,7 @@ class AttachmentSubstitutionProxy(object):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class NamedAttachmentsSubstitutionProxy(object):
|
class NamedAttachmentsSubstitutionProxy:
|
||||||
def __init__(self, formdata, parts):
|
def __init__(self, formdata, parts):
|
||||||
self.formdata = formdata
|
self.formdata = formdata
|
||||||
self.parts = parts[:]
|
self.parts = parts[:]
|
||||||
|
@ -181,7 +181,7 @@ class NamedAttachmentsSubstitutionProxy(object):
|
||||||
return AttachmentSubstitutionProxy(self.formdata, self.parts[i])
|
return AttachmentSubstitutionProxy(self.formdata, self.parts[i])
|
||||||
|
|
||||||
|
|
||||||
class AttachmentsSubstitutionProxy(object):
|
class AttachmentsSubstitutionProxy:
|
||||||
def __init__(self, formdata):
|
def __init__(self, formdata):
|
||||||
self.formdata = formdata
|
self.formdata = formdata
|
||||||
|
|
||||||
|
@ -940,7 +940,7 @@ class Workflow(StorableObject):
|
||||||
return list(CardDef.select(lambda x: x.workflow_id == self.id, **kwargs))
|
return list(CardDef.select(lambda x: x.workflow_id == self.id, **kwargs))
|
||||||
|
|
||||||
|
|
||||||
class XmlSerialisable(object):
|
class XmlSerialisable:
|
||||||
node_name = None
|
node_name = None
|
||||||
key = None
|
key = None
|
||||||
|
|
||||||
|
@ -1132,7 +1132,7 @@ class WorkflowGlobalActionManualTrigger(WorkflowGlobalActionTrigger):
|
||||||
self._roles_init_with_xml('roles', elem, charset, include_id=include_id, snapshot=snapshot)
|
self._roles_init_with_xml('roles', elem, charset, include_id=include_id, snapshot=snapshot)
|
||||||
|
|
||||||
|
|
||||||
class WorkflowGlobalActionTimeoutTriggerMarker(object):
|
class WorkflowGlobalActionTimeoutTriggerMarker:
|
||||||
def __init__(self, timeout_id):
|
def __init__(self, timeout_id):
|
||||||
self.timeout_id = timeout_id
|
self.timeout_id = timeout_id
|
||||||
|
|
||||||
|
@ -1469,7 +1469,7 @@ class WorkflowGlobalActionWebserviceTrigger(WorkflowGlobalActionManualTrigger):
|
||||||
return [('hooks', WorkflowGlobalActionWebserviceHooksDirectory(formdata))]
|
return [('hooks', WorkflowGlobalActionWebserviceHooksDirectory(formdata))]
|
||||||
|
|
||||||
|
|
||||||
class WorkflowGlobalAction(object):
|
class WorkflowGlobalAction:
|
||||||
id = None
|
id = None
|
||||||
name = None
|
name = None
|
||||||
items = None
|
items = None
|
||||||
|
@ -1549,7 +1549,7 @@ class WorkflowGlobalAction(object):
|
||||||
trigger_o.init_with_xml(trigger, charset, include_id=include_id, snapshot=snapshot)
|
trigger_o.init_with_xml(trigger, charset, include_id=include_id, snapshot=snapshot)
|
||||||
|
|
||||||
|
|
||||||
class WorkflowCriticalityLevel(object):
|
class WorkflowCriticalityLevel:
|
||||||
id = None
|
id = None
|
||||||
name = None
|
name = None
|
||||||
colour = None
|
colour = None
|
||||||
|
@ -1574,7 +1574,7 @@ class WorkflowCriticalityLevel(object):
|
||||||
self.colour = xml_node_text(elem.find('colour'))
|
self.colour = xml_node_text(elem.find('colour'))
|
||||||
|
|
||||||
|
|
||||||
class WorkflowStatus(object):
|
class WorkflowStatus:
|
||||||
id = None
|
id = None
|
||||||
name = None
|
name = None
|
||||||
items = None
|
items = None
|
||||||
|
|
|
@ -277,7 +277,7 @@ class NamedWsCall(XmlStorableObject):
|
||||||
return json_loads(data)
|
return json_loads(data)
|
||||||
|
|
||||||
|
|
||||||
class WsCallsSubstitutionProxy(object):
|
class WsCallsSubstitutionProxy:
|
||||||
def __getattr__(self, attr):
|
def __getattr__(self, attr):
|
||||||
try:
|
try:
|
||||||
return NamedWsCall.get(attr).call()
|
return NamedWsCall.get(attr).call()
|
||||||
|
|
Loading…
Reference in New Issue