diff options
| author | Nejc Habjan <nejc.habjan@siemens.com> | 2022-01-23 10:28:33 +0100 |
|---|---|---|
| committer | John Villalovos <john@sodarock.com> | 2022-01-23 07:14:49 -0800 |
| commit | 30117a3b6a8ee24362de798b2fa596a343b8774f (patch) | |
| tree | 262caa305f585da131785c2c80747f4840f9730a /gitlab | |
| parent | 271cfd3651e4e9cda974d5c3f411cecb6dca6c3c (diff) | |
| download | gitlab-30117a3b6a8ee24362de798b2fa596a343b8774f.tar.gz | |
chore: use dataclass for RequiredOptional
Diffstat (limited to 'gitlab')
| -rw-r--r-- | gitlab/base.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gitlab/base.py b/gitlab/base.py index b6ced89..aa18dcf 100644 --- a/gitlab/base.py +++ b/gitlab/base.py @@ -18,8 +18,9 @@ import importlib import pprint import textwrap +from dataclasses import dataclass from types import ModuleType -from typing import Any, Dict, Iterable, NamedTuple, Optional, Tuple, Type, Union +from typing import Any, Dict, Iterable, Optional, Tuple, Type, Union import gitlab from gitlab import types as g_types @@ -316,7 +317,8 @@ class RESTObjectList: return self._list.total -class RequiredOptional(NamedTuple): +@dataclass(frozen=True) +class RequiredOptional: required: Tuple[str, ...] = () optional: Tuple[str, ...] = () |
