diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index 616750c78..e08869903 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -1605,7 +1605,7 @@ The file can be in one of the following formats: `hosts` (with any extension). -Type: <> +Type: <> Default: @@ -1621,7 +1621,7 @@ List of domains that should always be loaded, despite being ad-blocked. Domains may contain * and ? wildcards and are otherwise required to exactly match the requested domain. Local domains are always exempt from hostblocking. -Type: <> +Type: <> Default: @@ -1944,7 +1944,7 @@ Default: +pass:[ask]+ === content.user_stylesheets A list of user stylesheet filenames to use. -Type: <> +Type: <> Default: empty @@ -2364,7 +2364,7 @@ Default: +pass:[letter]+ === hints.next_regexes A comma-separated list of regexes to use for 'next' links. -Type: <> +Type: <> Default: @@ -2379,7 +2379,7 @@ Default: === hints.prev_regexes A comma-separated list of regexes to use for 'prev' links. -Type: <> +Type: <> Default: @@ -2547,7 +2547,7 @@ Default: +pass:[false]+ Keychains that shouldn't be shown in the keyhint dialog. Globs are supported, so `;*` will blacklist all keychains starting with `;`. Use `*` to disable keyhints. -Type: <> +Type: <> Default: empty @@ -2641,7 +2641,7 @@ Default: +pass:[8]+ Additional arguments to pass to Qt, without leading `--`. With QtWebEngine, some Chromium arguments (see https://peter.sh/experiments/chromium-command-line-switches/ for a list) will work. -Type: <> +Type: <> Default: empty @@ -3056,7 +3056,7 @@ Default: === url.start_pages The page(s) to open at the start. -Type: <> +Type: <> Default: +pass:[https://start.duckduckgo.com]+ @@ -3064,7 +3064,7 @@ Default: +pass:[https://start.duckduckgo.com]+ === url.yank_ignored_parameters The URL parameters to strip with `:yank url`. -Type: <> +Type: <> Default: @@ -3120,7 +3120,7 @@ Default: +pass:[100%]+ === zoom.levels The available zoom levels. -Type: <> +Type: <> Default: diff --git a/qutebrowser/config/configtypes.py b/qutebrowser/config/configtypes.py index 499b0c994..c9b177d3e 100644 --- a/qutebrowser/config/configtypes.py +++ b/qutebrowser/config/configtypes.py @@ -495,7 +495,7 @@ class ListOrValue(BaseType): self.valtype = valtype def get_name(self): - return self.listtype.get_name() + ' or ' + self.valtype.get_name() + return self.listtype.get_name() + ', or ' + self.valtype.get_name() def get_valid_values(self): return self.valtype.get_valid_values() @@ -1306,6 +1306,8 @@ class ShellCommand(List): placeholder: If there should be a placeholder. """ + _show_valtype = False + def __init__(self, placeholder=False, none_ok=False): super().__init__(valtype=String(), none_ok=none_ok) self.placeholder = placeholder diff --git a/scripts/dev/src2asciidoc.py b/scripts/dev/src2asciidoc.py index 9bfd346b2..817b44a00 100755 --- a/scripts/dev/src2asciidoc.py +++ b/scripts/dev/src2asciidoc.py @@ -416,8 +416,7 @@ def _generate_setting_option(f, opt): f.write("=== {}".format(opt.name) + "\n") f.write(opt.description + "\n") f.write("\n") - f.write('Type: <>\n'.format( - typ=opt.typ.__class__.__name__)) + f.write('Type: <>\n'.format(typ=opt.typ.get_name())) f.write("\n") valid_values = opt.typ.get_valid_values() diff --git a/tests/unit/config/test_configtypes.py b/tests/unit/config/test_configtypes.py index 5030f2c51..1c6ed7f08 100644 --- a/tests/unit/config/test_configtypes.py +++ b/tests/unit/config/test_configtypes.py @@ -720,7 +720,7 @@ class TestListOrValue: klass(strtype, length=3).to_py(val) def test_get_name(self, strtype, klass): - assert klass(strtype).get_name() == 'List of String or String' + assert klass(strtype).get_name() == 'List of String, or String' def test_get_valid_values(self, klass): valid_values = configtypes.ValidValues('foo', 'bar', 'baz')