misc: pylint fix spacing around comments (#52222)
This commit is contained in:
parent
41bf7dfac9
commit
14c491d93b
|
@ -78,7 +78,7 @@ class FormdefImportRecoverableError(FormdefImportError):
|
|||
|
||||
|
||||
class FormField(object):
|
||||
### only used to unpickle form fields from older (<200603) versions
|
||||
# only used to unpickle form fields from older (<200603) versions
|
||||
def __setstate__(self, dict):
|
||||
type = dict['type']
|
||||
self.real_field = fields.get_field_class_by_type(type)(**dict)
|
||||
|
|
|
@ -384,7 +384,7 @@ class Template:
|
|||
if cmd == 'else':
|
||||
if len(args) > 1:
|
||||
raise ArgCountSyntaxError(str(args[1:]), line, column)
|
||||
### check: don't allow for 'for' cmd
|
||||
# check: don't allow for 'for' cmd
|
||||
try:
|
||||
idx = stack[-1][1]
|
||||
except IndexError:
|
||||
|
@ -411,7 +411,7 @@ class Template:
|
|||
elif cmd in _block_cmds:
|
||||
if len(args) > _block_cmd_specs[cmd] + 1:
|
||||
raise ArgCountSyntaxError(str(args[1:]), line, column)
|
||||
### this assumes arg1 is always a ref unless cmd is 'define'
|
||||
# this assumes arg1 is always a ref unless cmd is 'define'
|
||||
if cmd != 'define':
|
||||
args[1] = _prepare_ref(args[1], for_names, file_args)
|
||||
|
||||
|
@ -461,7 +461,7 @@ class Template:
|
|||
column += 2 + len(piece)
|
||||
|
||||
if stack:
|
||||
### would be nice to say which blocks...
|
||||
# would be nice to say which blocks...
|
||||
raise UnclosedBlocksError('', line, column)
|
||||
return program
|
||||
|
||||
|
@ -496,15 +496,15 @@ class Template:
|
|||
_write_value(valref, fp, ctx, rtf_escape)
|
||||
|
||||
def _cmd_print_xml(self, valref, fp, ctx):
|
||||
### use the same quoting as HTML for now
|
||||
# use the same quoting as HTML for now
|
||||
self._cmd_print_html(valref, fp, ctx)
|
||||
|
||||
def _cmd_include(self, include_ref, fp, ctx):
|
||||
(valref, reader) = include_ref
|
||||
fname = _get_value(valref, ctx)
|
||||
### note: we don't have the set of for_names to pass into this parse.
|
||||
### I don't think there is anything to do but document it. we also
|
||||
### don't have a current format (since that is a compile-time concept).
|
||||
# note: we don't have the set of for_names to pass into this parse.
|
||||
# I don't think there is anything to do but document it. we also
|
||||
# don't have a current format (since that is a compile-time concept).
|
||||
self._execute(self._parse(reader.read_other(fname)), fp, ctx)
|
||||
|
||||
def _cmd_if_any(self, args, fp, ctx):
|
||||
|
@ -618,8 +618,8 @@ def _prepare_ref(refname, for_names, file_args):
|
|||
|
||||
# rewrite the refname to ensure that any potential 'for' processing
|
||||
# has the correct name
|
||||
### this can make it hard for debugging include files since we lose
|
||||
### the 'argNNN' names
|
||||
# this can make it hard for debugging include files since we lose
|
||||
# the 'argNNN' names
|
||||
if not rest:
|
||||
return start, start, []
|
||||
refname = start + '.' + '.'.join(rest)
|
||||
|
|
|
@ -1637,7 +1637,7 @@ class FileSizeWidget(ValidatedStringWidget):
|
|||
def parse_file_size(cls, value):
|
||||
try:
|
||||
value, unit = re.search(cls.regex, value).groups()
|
||||
except AttributeError: # None has no .groups()
|
||||
except AttributeError: # None has no .groups()
|
||||
raise ValueError()
|
||||
coeffs = {
|
||||
'Mi': 2 ** 20,
|
||||
|
|
|
@ -114,10 +114,10 @@ TEMPLATES = [
|
|||
MIDDLEWARE = (
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'wcs.middleware.PublisherInitialisationMiddleware',
|
||||
#'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
#'django.middleware.csrf.CsrfViewMiddleware',
|
||||
#'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
#'django.contrib.messages.middleware.MessageMiddleware',
|
||||
# 'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
# 'django.middleware.csrf.CsrfViewMiddleware',
|
||||
# 'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
# 'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
'wcs.compat.PublishErrorMiddleware',
|
||||
'wcs.middleware.AfterJobsMiddleware',
|
||||
|
@ -132,12 +132,12 @@ WSGI_APPLICATION = 'wcs.wsgi.application'
|
|||
FORMAT_MODULE_PATH = 'wcs.formats'
|
||||
|
||||
INSTALLED_APPS = (
|
||||
#'django.contrib.auth',
|
||||
#'django.contrib.contenttypes',
|
||||
#'django.contrib.sessions',
|
||||
#'django.contrib.sites',
|
||||
#'django.contrib.messages',
|
||||
#'django.contrib.admin',
|
||||
# 'django.contrib.auth',
|
||||
# 'django.contrib.contenttypes',
|
||||
# 'django.contrib.sessions',
|
||||
# 'django.contrib.sites',
|
||||
# 'django.contrib.messages',
|
||||
# 'django.contrib.admin',
|
||||
'gadjo',
|
||||
'wcs.ctl',
|
||||
'wcs.qommon',
|
||||
|
|
Loading…
Reference in New Issue