diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-02-07 20:12:04 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:53 +0100 |
commit | b3a378462ba3f7851c4e4d8f63c781f8d498290d (patch) | |
tree | d767546a90f6605e05f6d03cafc3fa6e338521c7 /slack/weechat_config.py | |
parent | 4de39f91d9d8942816b8967a115010c466b8f252 (diff) | |
download | wee-slack-b3a378462ba3f7851c4e4d8f63c781f8d498290d.tar.gz |
Use Optional instead of Union with None
Diffstat (limited to 'slack/weechat_config.py')
-rw-r--r-- | slack/weechat_config.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/slack/weechat_config.py b/slack/weechat_config.py index 8d17b13..7fc2742 100644 --- a/slack/weechat_config.py +++ b/slack/weechat_config.py @@ -1,7 +1,7 @@ from __future__ import annotations from dataclasses import dataclass -from typing import Generic, TypeVar, Union, cast +from typing import Generic, Optional, TypeVar, Union, cast import weechat @@ -58,10 +58,10 @@ class WeeChatOption(Generic[WeeChatOptionType]): name: str description: str default_value: WeeChatOptionType - min_value: Union[int, None] = None - max_value: Union[int, None] = None - string_values: Union[str, None] = None - parent_option: Union[WeeChatOption[WeeChatOptionType], None] = None + min_value: Optional[int] = None + max_value: Optional[int] = None + string_values: Optional[str] = None + parent_option: Optional[WeeChatOption[WeeChatOptionType]] = None def __post_init__(self): self._pointer = self._create_weechat_option() |