From 98d15de460d1bfca5ffb2286a3e8f9966766ffd0 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 26 Feb 2014 09:18:27 +0100 Subject: [PATCH] Fix style issues --- qutebrowser/commands/utils.py | 2 -- qutebrowser/config/config.py | 16 ++++++++++++---- qutebrowser/config/templates.py | 1 - qutebrowser/widgets/completion.py | 2 +- run_checks.py | 1 + 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/qutebrowser/commands/utils.py b/qutebrowser/commands/utils.py index 5ca99f55e..13bffe913 100644 --- a/qutebrowser/commands/utils.py +++ b/qutebrowser/commands/utils.py @@ -46,8 +46,6 @@ class register: """ - # pylint: disable=too-few-public-methods - def __init__(self, instance=None, name=None, nargs=None, split_args=True, hide=False): """Gets called on parse-time with the decorator arguments. diff --git a/qutebrowser/config/config.py b/qutebrowser/config/config.py index cf21d4026..40e26473c 100644 --- a/qutebrowser/config/config.py +++ b/qutebrowser/config/config.py @@ -25,7 +25,7 @@ from collections import OrderedDict from configparser import (ConfigParser, ExtendedInterpolation, NoSectionError, NoOptionError) -from qutebrowser.utils.misc import read_file +#from qutebrowser.utils.misc import read_file import qutebrowser.config.options as opt import qutebrowser.config.sections as sect @@ -45,7 +45,8 @@ def init(confdir): """ global config, state logging.debug("Config init, confdir {}".format(confdir)) - #config = Config(confdir, 'qutebrowser.conf', read_file('qutebrowser.conf')) + #config = Config(confdir, 'qutebrowser.conf', + # read_file('qutebrowser.conf')) config = NewConfig() state = Config(confdir, 'state', always_save=True) @@ -135,11 +136,18 @@ class NewConfig: return val.value def save(self): - # FIXME + """Save the config file.""" + # FIXME to be implemented pass def dump_userconfig(self): - # FIXME + """Get the part of the config which was changed by the user. + + Return: + The changed config part as string. + + """ + # FIXME to be implemented pass diff --git a/qutebrowser/config/templates.py b/qutebrowser/config/templates.py index 4d312132a..feadd57f1 100644 --- a/qutebrowser/config/templates.py +++ b/qutebrowser/config/templates.py @@ -17,7 +17,6 @@ """Templates for setting options.""" -import logging from collections import OrderedDict import qutebrowser.commands.utils as cmdutils diff --git a/qutebrowser/widgets/completion.py b/qutebrowser/widgets/completion.py index 0b57b3a8b..43e4a6adc 100644 --- a/qutebrowser/widgets/completion.py +++ b/qutebrowser/widgets/completion.py @@ -96,7 +96,7 @@ class CompletionView(QTreeView): def __init__(self, parent=None): super().__init__(parent) - self._enabled = config.config.getboolean('general', 'show_completion') + self._enabled = config.config.get('general', 'show_completion') self._completion_models = {} self._completion_models[''] = None self._completion_models['command'] = CommandCompletionModel() diff --git a/run_checks.py b/run_checks.py index 340f423b5..70749a3b7 100644 --- a/run_checks.py +++ b/run_checks.py @@ -59,6 +59,7 @@ options = { 'global-statement', 'no-init', 'too-many-arguments', + 'too-few-public-methods', # visual noise 'locally-disabled', ],