Remove valid values for Bool from docs
This commit is contained in:
parent
6fa001481d
commit
36857d9250
@ -280,11 +280,6 @@ Always restore open sites when qutebrowser is reopened.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
[[backend]]
|
||||
@ -1304,11 +1299,6 @@ Move on to the next part when there's only one possible completion left.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[completion.scrollbar.padding]]
|
||||
@ -1347,11 +1337,6 @@ Shrink the completion to be smaller than the configured size if there are no scr
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
[[completion.timestamp_format]]
|
||||
@ -1395,11 +1380,6 @@ An application cache acts like an HTTP cache in some sense. For documents that u
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
This setting is only available with the QtWebKit backend.
|
||||
@ -1448,11 +1428,6 @@ Note this option needs a restart with QtWebEngine on Qt < 5.9.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[content.default_encoding]]
|
||||
@ -1471,11 +1446,6 @@ This needs to be enabled for `:inspector` to work and also adds an _Inspect_ ent
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
This setting is only available with the QtWebKit backend.
|
||||
@ -1486,11 +1456,6 @@ Try to pre-fetch DNS entries to speed up browsing.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
This setting is only available with the QtWebKit backend.
|
||||
@ -1502,11 +1467,6 @@ This will flatten all the frames to become one scrollable page.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
This setting is only available with the QtWebKit backend.
|
||||
@ -1548,11 +1508,6 @@ When this is set to true, qutebrowser asks websites to not track your identity.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[content.headers.referer]]
|
||||
@ -1586,11 +1541,6 @@ Whether host blocking is enabled.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[content.host_blocking.lists]]
|
||||
@ -1633,11 +1583,6 @@ Enable or disable hyperlink auditing (`<a ping>`).
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
[[content.images]]
|
||||
@ -1646,11 +1591,6 @@ Whether images are automatically loaded in web pages.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[content.javascript.alert]]
|
||||
@ -1659,11 +1599,6 @@ Show javascript alerts.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[content.javascript.can_access_clipboard]]
|
||||
@ -1673,11 +1608,6 @@ With QtWebEngine, writing the clipboard as response to a user interaction is alw
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
[[content.javascript.can_close_tabs]]
|
||||
@ -1686,11 +1616,6 @@ Whether JavaScript can close tabs.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
This setting is only available with the QtWebKit backend.
|
||||
@ -1701,11 +1626,6 @@ Whether JavaScript can open new tabs without user interaction.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
[[content.javascript.enabled]]
|
||||
@ -1714,11 +1634,6 @@ Enables or disables JavaScript.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[content.javascript.log]]
|
||||
@ -1742,11 +1657,6 @@ Use the standard JavaScript modal dialog for `alert()` and `confirm()`
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
[[content.javascript.prompt]]
|
||||
@ -1755,11 +1665,6 @@ Show javascript prompts.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[content.local_content_can_access_file_urls]]
|
||||
@ -1768,11 +1673,6 @@ Whether locally loaded documents are allowed to access other local urls.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[content.local_content_can_access_remote_urls]]
|
||||
@ -1781,11 +1681,6 @@ Whether locally loaded documents are allowed to access remote urls.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
[[content.local_storage]]
|
||||
@ -1794,11 +1689,6 @@ Whether support for HTML 5 local storage and Web SQL is enabled.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[content.media_capture]]
|
||||
@ -1847,11 +1737,6 @@ Note that the files can still be downloaded by clicking the download button in t
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
This setting is only available with the QtWebKit backend.
|
||||
@ -1862,11 +1747,6 @@ Enables or disables plugins in Web pages.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
[[content.print_element_backgrounds]]
|
||||
@ -1875,11 +1755,6 @@ Whether the background color and images are also drawn when the page is printed.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
On QtWebEngine, this setting requires Qt 5.8 or newer.
|
||||
@ -1890,11 +1765,6 @@ Open new windows in private browsing mode which does not record visited pages.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
[[content.proxy]]
|
||||
@ -1917,11 +1787,6 @@ Send DNS requests over the configured proxy.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
This setting is only available with the QtWebKit backend.
|
||||
@ -1954,11 +1819,6 @@ Enables or disables WebGL.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[content.xss_auditing]]
|
||||
@ -1968,11 +1828,6 @@ Suspicious scripts will be blocked and reported in the inspector's JavaScript co
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
[[downloads.location.directory]]
|
||||
@ -1991,11 +1846,6 @@ If set to false, `downloads.location.directory` will be used.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[downloads.location.remember]]
|
||||
@ -2004,11 +1854,6 @@ Remember the last used download directory.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[downloads.location.suggestion]]
|
||||
@ -2270,11 +2115,6 @@ This is needed for QtWebEngine to work with Nouveau drivers. This setting requir
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
This setting is only available with the QtWebEngine backend.
|
||||
@ -2347,11 +2187,6 @@ Hide unmatched hints in rapid mode.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[hints.min_chars]]
|
||||
@ -2412,11 +2247,6 @@ Ignored for number hints.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[hints.uppercase]]
|
||||
@ -2425,11 +2255,6 @@ Make chars in hint strings uppercase.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
[[history_gap_interval]]
|
||||
@ -2475,11 +2300,6 @@ Leave insert mode if a non-editable element is clicked.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[input.insert_mode.auto_load]]
|
||||
@ -2488,11 +2308,6 @@ Automatically enter insert mode if an editable element is focused after loading
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
[[input.insert_mode.plugins]]
|
||||
@ -2501,11 +2316,6 @@ Switch to insert mode when clicking flash and other plugins.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
[[input.links_included_in_focus_chain]]
|
||||
@ -2514,11 +2324,6 @@ Include hyperlinks in the keyboard focus chain when tabbing.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[input.partial_timeout]]
|
||||
@ -2537,11 +2342,6 @@ This disables the context menu.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
[[input.spatial_navigation]]
|
||||
@ -2551,11 +2351,6 @@ Spatial navigation consists in the ability to navigate between focusable element
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
[[keyhint.blacklist]]
|
||||
@ -2590,11 +2385,6 @@ Show messages in unfocused windows.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
[[new_instance_open_target]]
|
||||
@ -2637,11 +2427,6 @@ Show a filebrowser in upload/download prompts.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[prompt.radius]]
|
||||
@ -2668,11 +2453,6 @@ Show a scrollbar.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
[[scrolling.smooth]]
|
||||
@ -2682,11 +2462,6 @@ Note smooth scrolling does not work with the `:scroll-px` command.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
[[session_default_name]]
|
||||
@ -2704,11 +2479,6 @@ Hide the statusbar unless a message is shown.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
[[statusbar.padding]]
|
||||
@ -2743,11 +2513,6 @@ Open new tabs (middleclick/ctrl+click) in the background.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
[[tabs.close_mouse_button]]
|
||||
@ -2779,11 +2544,6 @@ Show favicons in the tab bar.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[tabs.indicator_padding]]
|
||||
@ -2821,11 +2581,6 @@ Switch between tabs using the mouse wheel.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[tabs.new_position.related]]
|
||||
@ -2929,11 +2684,6 @@ Open a new window for every tab.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
[[tabs.title.alignment]]
|
||||
@ -3001,11 +2751,6 @@ Whether to wrap when changing tabs.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[true]+
|
||||
|
||||
[[url.auto_search]]
|
||||
@ -3090,11 +2835,6 @@ Hide the window decoration when using wayland (requires restart)
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
[[window.title_format]]
|
||||
@ -3164,11 +2904,6 @@ Whether the zoom factor on a frame applies only to the text or to all content.
|
||||
|
||||
Type: <<types,Bool>>
|
||||
|
||||
Valid values:
|
||||
|
||||
* +true+
|
||||
* +false+
|
||||
|
||||
Default: +pass:[false]+
|
||||
|
||||
This setting is only available with the QtWebKit backend.
|
||||
|
@ -264,7 +264,7 @@ def write_config_py(filename, options, bindings):
|
||||
f.write('# Type: {}\n'.format(opt.typ.get_name()))
|
||||
|
||||
valid_values = opt.typ.get_valid_values()
|
||||
if valid_values is not None:
|
||||
if valid_values is not None and valid_values.generate_docs:
|
||||
f.write("# Valid values:\n")
|
||||
for val in valid_values:
|
||||
try:
|
||||
|
@ -78,13 +78,15 @@ class ValidValues:
|
||||
Attributes:
|
||||
values: A list with the allowed untransformed values.
|
||||
descriptions: A dict with value/desc mappings.
|
||||
generate_docs: Whether to show the values in the docs.
|
||||
"""
|
||||
|
||||
def __init__(self, *values):
|
||||
def __init__(self, *values, generate_docs=True):
|
||||
if not values:
|
||||
raise ValueError("ValidValues with no values makes no sense!")
|
||||
self.descriptions = {}
|
||||
self.values = []
|
||||
self.generate_docs = generate_docs
|
||||
for value in values:
|
||||
if isinstance(value, str):
|
||||
# Value without description
|
||||
@ -608,7 +610,7 @@ class Bool(BaseType):
|
||||
|
||||
def __init__(self, none_ok=False):
|
||||
super().__init__(none_ok)
|
||||
self.valid_values = ValidValues('true', 'false')
|
||||
self.valid_values = ValidValues('true', 'false', generate_docs=False)
|
||||
|
||||
def to_py(self, value):
|
||||
self._basic_py_validation(value, bool)
|
||||
|
@ -421,7 +421,7 @@ def _generate_setting_option(f, opt):
|
||||
f.write("\n")
|
||||
|
||||
valid_values = opt.typ.get_valid_values()
|
||||
if valid_values is not None:
|
||||
if valid_values is not None and valid_values.generate_docs:
|
||||
f.write("Valid values:\n")
|
||||
f.write("\n")
|
||||
for val in valid_values:
|
||||
|
Loading…
Reference in New Issue
Block a user