We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
bring_front_click is bool type but can be string
# bring_front_click is bool type but can be “floating_only”

qtile check reported error
error: config.bring_front_click variable differs from runtime type Literal['floating_only']

as per documentation floating_only is supported but `bring_front_click` variable is declared as bool type.
is it ok if I leave it as 'floating_only'?

# Qtile version : 1.8.1

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `libqtile/confreader.py`
Content:
```
1 # Copyright (c) 2008, Aldo Cortesi <aldo@corte.si>
2 # Copyright (c) 2011, Andrew Grigorev <andrew@ei-grad.ru>
3 #
4 # All rights reserved.
5 #
6 # Permission is hereby granted, free of charge, to any person obtaining a copy
7 # of this software and associated documentation files (the "Software"), to deal
8 # in the Software without restriction, including without limitation the rights
9 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 # copies of the Software, and to permit persons to whom the Software is
11 # furnished to do so, subject to the following conditions:
12 #
13 # The above copyright notice and this permission notice shall be included in
14 # all copies or substantial portions of the Software.
15 #
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 # SOFTWARE.
23 
24 from __future__ import annotations
25 
26 import importlib
27 import sys
28 from pathlib import Path
29 from typing import TYPE_CHECKING
30 
31 from libqtile.backend.x11 import core
32 
33 if TYPE_CHECKING:
34     from typing import Any, Dict, List
35 
36     from typing_extensions import Literal
37 
38     from libqtile.config import Group, Key, Mouse, Rule, Screen
39     from libqtile.layout.base import Layout
40 
41 
42 class ConfigError(Exception):
43     pass
44 
45 
46 config_pyi_header = """
47 from typing import Any, Dict, List
48 from typing_extensions import Literal
49 from libqtile.config import Group, Key, Mouse, Rule, Screen
50 from libqtile.layout.base import Layout
51 
52 """
53 
54 
55 class Config:
56     # All configuration options
57     keys: List[Key]
58     mouse: List[Mouse]
59     groups: List[Group]
60     dgroups_key_binder: Any
61     dgroups_app_rules: List[Rule]
62     follow_mouse_focus: bool
63     focus_on_window_activation: Literal["focus", "smart", "urgent", "never"]
64     cursor_warp: bool
65     layouts: List[Layout]
66     floating_layout: Layout
67     screens: List[Screen]
68     auto_fullscreen: bool
69     widget_defaults: Dict[str, Any]
70     extension_defaults: Dict[str, Any]
71     bring_front_click: bool
72     reconfigure_screens: bool
73     wmname: str
74     auto_minimize: bool
75 
76     def __init__(self, file_path=None, **settings):
77         """Create a Config() object from settings
78 
79         Only attributes found in Config.__annotations__ will be added to object.
80         config attribute precedence is 1.) **settings 2.) self 3.) default_config
81         """
82         self.file_path = file_path
83         self.update(**settings)
84 
85     def update(self, *, fake_screens=None, **settings):
86         from libqtile.resources import default_config
87 
88         if fake_screens:
89             self.fake_screens = fake_screens
90 
91         default = vars(default_config)
92         for key in self.__annotations__.keys():
93             try:
94                 value = settings[key]
95             except KeyError:
96                 value = getattr(self, key, default[key])
97             setattr(self, key, value)
98 
99     def load(self):
100         if not self.file_path:
101             return
102 
103         path = Path(self.file_path)
104         name = path.stem
105         sys.path.insert(0, path.parent.as_posix())
106 
107         if name in sys.modules:
108             config = importlib.reload(sys.modules[name])
109         else:
110             config = importlib.import_module(name)
111 
112         self.update(**vars(config))
113 
114     def validate(self) -> None:
115         """
116             Validate the configuration against the core.
117         """
118         valid_keys = core.get_keys()
119         valid_mods = core.get_modifiers()
120         # we explicitly do not want to set self.keys and self.mouse above,
121         # because they are dynamically resolved from the default_config. so we
122         # need to ignore the errors here about missing attributes.
123         for k in self.keys:
124             if k.key not in valid_keys:
125                 raise ConfigError("No such key: %s" % k.key)
126             for m in k.modifiers:
127                 if m not in valid_mods:
128                     raise ConfigError("No such modifier: %s" % m)
129         for ms in self.mouse:
130             for m in ms.modifiers:
131                 if m not in valid_mods:
132                     raise ConfigError("No such modifier: %s" % m)
133
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/libqtile/confreader.py b/libqtile/confreader.py
--- a/libqtile/confreader.py
+++ b/libqtile/confreader.py
@@ -31,7 +31,7 @@
 from libqtile.backend.x11 import core
 
 if TYPE_CHECKING:
-    from typing import Any, Dict, List
+    from typing import Any, Dict, List, Union
 
     from typing_extensions import Literal
 
@@ -44,7 +44,7 @@
 
 
 config_pyi_header = """
-from typing import Any, Dict, List
+from typing import Any, Dict, List, Union
 from typing_extensions import Literal
 from libqtile.config import Group, Key, Mouse, Rule, Screen
 from libqtile.layout.base import Layout
@@ -68,7 +68,7 @@
     auto_fullscreen: bool
     widget_defaults: Dict[str, Any]
     extension_defaults: Dict[str, Any]
-    bring_front_click: bool
+    bring_front_click: Union[bool, Literal["floating_only"]]
     reconfigure_screens: bool
     wmname: str
     auto_minimize: bool

{"golden_diff": "diff --git a/libqtile/confreader.py b/libqtile/confreader.py\n--- a/libqtile/confreader.py\n+++ b/libqtile/confreader.py\n@@ -31,7 +31,7 @@\n from libqtile.backend.x11 import core\n \n if TYPE_CHECKING:\n-    from typing import Any, Dict, List\n+    from typing import Any, Dict, List, Union\n \n     from typing_extensions import Literal\n \n@@ -44,7 +44,7 @@\n \n \n config_pyi_header = \"\"\"\n-from typing import Any, Dict, List\n+from typing import Any, Dict, List, Union\n from typing_extensions import Literal\n from libqtile.config import Group, Key, Mouse, Rule, Screen\n from libqtile.layout.base import Layout\n@@ -68,7 +68,7 @@\n     auto_fullscreen: bool\n     widget_defaults: Dict[str, Any]\n     extension_defaults: Dict[str, Any]\n-    bring_front_click: bool\n+    bring_front_click: Union[bool, Literal[\"floating_only\"]]\n     reconfigure_screens: bool\n     wmname: str\n     auto_minimize: bool\n", "issue": "bring_front_click is bool type but can be string\n# bring_front_click is bool type but can be \u201cfloating_only\u201d\r\n\r\nqtile check reported error\r\nerror: config.bring_front_click variable differs from runtime type Literal['floating_only']\r\n\r\nas per documentation floating_only is supported but `bring_front_click` variable is declared as bool type.\r\nis it ok if I leave it as 'floating_only'?\r\n\r\n# Qtile version : 1.8.1\n", "before_files": [{"content": "# Copyright (c) 2008, Aldo Cortesi <aldo@corte.si>\n# Copyright (c) 2011, Andrew Grigorev <andrew@ei-grad.ru>\n#\n# All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n\nfrom __future__ import annotations\n\nimport importlib\nimport sys\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING\n\nfrom libqtile.backend.x11 import core\n\nif TYPE_CHECKING:\n    from typing import Any, Dict, List\n\n    from typing_extensions import Literal\n\n    from libqtile.config import Group, Key, Mouse, Rule, Screen\n    from libqtile.layout.base import Layout\n\n\nclass ConfigError(Exception):\n    pass\n\n\nconfig_pyi_header = \"\"\"\nfrom typing import Any, Dict, List\nfrom typing_extensions import Literal\nfrom libqtile.config import Group, Key, Mouse, Rule, Screen\nfrom libqtile.layout.base import Layout\n\n\"\"\"\n\n\nclass Config:\n    # All configuration options\n    keys: List[Key]\n    mouse: List[Mouse]\n    groups: List[Group]\n    dgroups_key_binder: Any\n    dgroups_app_rules: List[Rule]\n    follow_mouse_focus: bool\n    focus_on_window_activation: Literal[\"focus\", \"smart\", \"urgent\", \"never\"]\n    cursor_warp: bool\n    layouts: List[Layout]\n    floating_layout: Layout\n    screens: List[Screen]\n    auto_fullscreen: bool\n    widget_defaults: Dict[str, Any]\n    extension_defaults: Dict[str, Any]\n    bring_front_click: bool\n    reconfigure_screens: bool\n    wmname: str\n    auto_minimize: bool\n\n    def __init__(self, file_path=None, **settings):\n        \"\"\"Create a Config() object from settings\n\n        Only attributes found in Config.__annotations__ will be added to object.\n        config attribute precedence is 1.) **settings 2.) self 3.) default_config\n        \"\"\"\n        self.file_path = file_path\n        self.update(**settings)\n\n    def update(self, *, fake_screens=None, **settings):\n        from libqtile.resources import default_config\n\n        if fake_screens:\n            self.fake_screens = fake_screens\n\n        default = vars(default_config)\n        for key in self.__annotations__.keys():\n            try:\n                value = settings[key]\n            except KeyError:\n                value = getattr(self, key, default[key])\n            setattr(self, key, value)\n\n    def load(self):\n        if not self.file_path:\n            return\n\n        path = Path(self.file_path)\n        name = path.stem\n        sys.path.insert(0, path.parent.as_posix())\n\n        if name in sys.modules:\n            config = importlib.reload(sys.modules[name])\n        else:\n            config = importlib.import_module(name)\n\n        self.update(**vars(config))\n\n    def validate(self) -> None:\n        \"\"\"\n            Validate the configuration against the core.\n        \"\"\"\n        valid_keys = core.get_keys()\n        valid_mods = core.get_modifiers()\n        # we explicitly do not want to set self.keys and self.mouse above,\n        # because they are dynamically resolved from the default_config. so we\n        # need to ignore the errors here about missing attributes.\n        for k in self.keys:\n            if k.key not in valid_keys:\n                raise ConfigError(\"No such key: %s\" % k.key)\n            for m in k.modifiers:\n                if m not in valid_mods:\n                    raise ConfigError(\"No such modifier: %s\" % m)\n        for ms in self.mouse:\n            for m in ms.modifiers:\n                if m not in valid_mods:\n                    raise ConfigError(\"No such modifier: %s\" % m)\n", "path": "libqtile/confreader.py"}], "after_files": [{"content": "# Copyright (c) 2008, Aldo Cortesi <aldo@corte.si>\n# Copyright (c) 2011, Andrew Grigorev <andrew@ei-grad.ru>\n#\n# All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n\nfrom __future__ import annotations\n\nimport importlib\nimport sys\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING\n\nfrom libqtile.backend.x11 import core\n\nif TYPE_CHECKING:\n    from typing import Any, Dict, List, Union\n\n    from typing_extensions import Literal\n\n    from libqtile.config import Group, Key, Mouse, Rule, Screen\n    from libqtile.layout.base import Layout\n\n\nclass ConfigError(Exception):\n    pass\n\n\nconfig_pyi_header = \"\"\"\nfrom typing import Any, Dict, List, Union\nfrom typing_extensions import Literal\nfrom libqtile.config import Group, Key, Mouse, Rule, Screen\nfrom libqtile.layout.base import Layout\n\n\"\"\"\n\n\nclass Config:\n    # All configuration options\n    keys: List[Key]\n    mouse: List[Mouse]\n    groups: List[Group]\n    dgroups_key_binder: Any\n    dgroups_app_rules: List[Rule]\n    follow_mouse_focus: bool\n    focus_on_window_activation: Literal[\"focus\", \"smart\", \"urgent\", \"never\"]\n    cursor_warp: bool\n    layouts: List[Layout]\n    floating_layout: Layout\n    screens: List[Screen]\n    auto_fullscreen: bool\n    widget_defaults: Dict[str, Any]\n    extension_defaults: Dict[str, Any]\n    bring_front_click: Union[bool, Literal[\"floating_only\"]]\n    reconfigure_screens: bool\n    wmname: str\n    auto_minimize: bool\n\n    def __init__(self, file_path=None, **settings):\n        \"\"\"Create a Config() object from settings\n\n        Only attributes found in Config.__annotations__ will be added to object.\n        config attribute precedence is 1.) **settings 2.) self 3.) default_config\n        \"\"\"\n        self.file_path = file_path\n        self.update(**settings)\n\n    def update(self, *, fake_screens=None, **settings):\n        from libqtile.resources import default_config\n\n        if fake_screens:\n            self.fake_screens = fake_screens\n\n        default = vars(default_config)\n        for key in self.__annotations__.keys():\n            try:\n                value = settings[key]\n            except KeyError:\n                value = getattr(self, key, default[key])\n            setattr(self, key, value)\n\n    def load(self):\n        if not self.file_path:\n            return\n\n        path = Path(self.file_path)\n        name = path.stem\n        sys.path.insert(0, path.parent.as_posix())\n\n        if name in sys.modules:\n            config = importlib.reload(sys.modules[name])\n        else:\n            config = importlib.import_module(name)\n\n        self.update(**vars(config))\n\n    def validate(self) -> None:\n        \"\"\"\n            Validate the configuration against the core.\n        \"\"\"\n        valid_keys = core.get_keys()\n        valid_mods = core.get_modifiers()\n        # we explicitly do not want to set self.keys and self.mouse above,\n        # because they are dynamically resolved from the default_config. so we\n        # need to ignore the errors here about missing attributes.\n        for k in self.keys:\n            if k.key not in valid_keys:\n                raise ConfigError(\"No such key: %s\" % k.key)\n            for m in k.modifiers:\n                if m not in valid_mods:\n                    raise ConfigError(\"No such modifier: %s\" % m)\n        for ms in self.mouse:\n            for m in ms.modifiers:\n                if m not in valid_mods:\n                    raise ConfigError(\"No such modifier: %s\" % m)\n", "path": "libqtile/confreader.py"}]}