summaryrefslogtreecommitdiff
path: root/qutebrowser/config/configdata.py
diff options
context:
space:
mode:
Diffstat (limited to 'qutebrowser/config/configdata.py')
-rw-r--r--qutebrowser/config/configdata.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py
index 065527bb9..14e1c30ef 100644
--- a/qutebrowser/config/configdata.py
+++ b/qutebrowser/config/configdata.py
@@ -28,7 +28,7 @@ from typing import (Any, Dict, Iterable, List, Mapping, MutableMapping, Optional
Sequence, Tuple, Union, cast)
import functools
-import attr
+import dataclasses
from qutebrowser.config import configtypes
from qutebrowser.utils import usertypes, qtutils, utils
from qutebrowser.misc import debugcachestats
@@ -39,7 +39,7 @@ MIGRATIONS = cast('Migrations', None)
_BackendDict = Mapping[str, Union[str, bool]]
-@attr.s
+@dataclasses.dataclass
class Option:
"""Description of an Option in the config.
@@ -47,18 +47,18 @@ class Option:
Note that this is just an option which exists, with no value associated.
"""
- name: str = attr.ib()
- typ: configtypes.BaseType = attr.ib()
- default: Any = attr.ib()
- backends: Iterable[usertypes.Backend] = attr.ib()
- raw_backends: Optional[Mapping[str, bool]] = attr.ib()
- description: str = attr.ib()
- supports_pattern: bool = attr.ib(default=False)
- restart: bool = attr.ib(default=False)
- no_autoconfig: bool = attr.ib(default=False)
+ name: str
+ typ: configtypes.BaseType
+ default: Any
+ backends: Iterable[usertypes.Backend]
+ raw_backends: Optional[Mapping[str, bool]]
+ description: str
+ supports_pattern: bool = False
+ restart: bool = False
+ no_autoconfig: bool = False
-@attr.s
+@dataclasses.dataclass
class Migrations:
"""Migrated options in configdata.yml.
@@ -68,8 +68,8 @@ class Migrations:
deleted: A list of option names which have been removed.
"""
- renamed: Dict[str, str] = attr.ib(default=attr.Factory(dict))
- deleted: List[str] = attr.ib(default=attr.Factory(list))
+ renamed: Dict[str, str] = dataclasses.field(default_factory=dict)
+ deleted: List[str] = dataclasses.field(default_factory=list)
def _raise_invalid_node(name: str, what: str, node: Any) -> None: