mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 18:51:41 +02:00
Fix mutable default value in dataclass
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import tempfile
|
import tempfile
|
||||||
from contextlib import suppress
|
from contextlib import suppress
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass, field
|
||||||
from typing import (
|
from typing import (
|
||||||
TYPE_CHECKING, Any, Callable, Dict, FrozenSet, Iterable, Iterator,
|
TYPE_CHECKING, Any, Callable, Dict, FrozenSet, Iterable, Iterator,
|
||||||
List, NoReturn, Optional, Set, Tuple, Type, Union, cast
|
List, NoReturn, Optional, Set, Tuple, Type, Union, cast
|
||||||
@@ -185,7 +185,7 @@ class ArgsHandling:
|
|||||||
json_field: str = ''
|
json_field: str = ''
|
||||||
count: Optional[int] = None
|
count: Optional[int] = None
|
||||||
spec: str = ''
|
spec: str = ''
|
||||||
completion: CompletionSpec = CompletionSpec()
|
completion: CompletionSpec = field(default_factory=CompletionSpec)
|
||||||
value_if_unspecified: Tuple[str, ...] = ()
|
value_if_unspecified: Tuple[str, ...] = ()
|
||||||
minimum_count: int = -1
|
minimum_count: int = -1
|
||||||
first_rest: Optional[Tuple[str, str]] = None
|
first_rest: Optional[Tuple[str, str]] = None
|
||||||
|
|||||||
Reference in New Issue
Block a user