diff options
author | Nejc Habjan <nejc.habjan@siemens.com> | 2022-01-23 10:28:33 +0100 |
---|---|---|
committer | Nejc Habjan <nejc.habjan@siemens.com> | 2022-01-23 10:28:33 +0100 |
commit | b368c227ec246158985725c7bec79b75f2c87b88 (patch) | |
tree | 104ab9cf00eced77797f753733168bf196a722fc /gitlab/base.py | |
parent | e827bd1d0e4182e5f5c1881913fdac58dc15ca9a (diff) | |
download | gitlab-chore/code-review-doctor-findings.tar.gz |
chore: use dataclass for RequiredOptionalchore/code-review-doctor-findings
Diffstat (limited to 'gitlab/base.py')
-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, ...] = () |