Always use a list for namedtuple.
This commit is contained in:
parent
0fadf6b091
commit
65d1d21d2e
1
doc/TODO
1
doc/TODO
@ -127,7 +127,6 @@ style
|
||||
tree?
|
||||
- Stuff under scripts/ (especially generate_doc and run_checks) could use a
|
||||
rewrite.
|
||||
- Always use a list as argument for namedtuple?
|
||||
- Use separate logger for config
|
||||
- Use unittest.Mock and especially unittest.patch more.
|
||||
- Use decorators for on_config_changed
|
||||
|
@ -34,7 +34,7 @@ from qutebrowser.commands import userscripts, cmdexc, cmdutils
|
||||
from qutebrowser.utils import usertypes, log, qtutils, message, objreg
|
||||
|
||||
|
||||
ElemTuple = collections.namedtuple('ElemTuple', 'elem, label')
|
||||
ElemTuple = collections.namedtuple('ElemTuple', ['elem', 'label'])
|
||||
|
||||
|
||||
Target = usertypes.enum('Target', ['normal', 'tab', 'tab_bg', 'yank',
|
||||
|
@ -57,7 +57,7 @@ class Command:
|
||||
"""
|
||||
|
||||
AnnotationInfo = collections.namedtuple('AnnotationInfo',
|
||||
'kwargs, typ, name, flag')
|
||||
['kwargs', 'typ', 'name', 'flag'])
|
||||
ParamType = usertypes.enum('ParamType', ['flag', 'positional'])
|
||||
|
||||
def __init__(self, name, split, hide, instance, completion, modes,
|
||||
|
@ -209,7 +209,7 @@ class ContentDispositionValue:
|
||||
peg.optional(';'))
|
||||
|
||||
|
||||
LangTagged = collections.namedtuple('LangTagged', 'string langtag')
|
||||
LangTagged = collections.namedtuple('LangTagged', ['string', 'langtag'])
|
||||
|
||||
|
||||
class DuplicateParamError(Exception):
|
||||
|
Loading…
Reference in New Issue
Block a user