diff options
author | Nejc Habjan <nejc.habjan@siemens.com> | 2022-01-22 04:04:38 +0100 |
---|---|---|
committer | John Villalovos <john@sodarock.com> | 2022-01-23 07:14:49 -0800 |
commit | ae2a015db1017d3bf9b5f1c5893727da9b0c937f (patch) | |
tree | d7fac15dfee5cf5b4168738fcfbe799765d42681 /gitlab/v4/cli.py | |
parent | 39e74355816700f101cd9bedd10a2873c2cdce1a (diff) | |
download | gitlab-ae2a015db1017d3bf9b5f1c5893727da9b0c937f.tar.gz |
chore: remove old-style classes
Diffstat (limited to 'gitlab/v4/cli.py')
-rw-r--r-- | gitlab/v4/cli.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gitlab/v4/cli.py b/gitlab/v4/cli.py index ddce8b6..7d8eab7 100644 --- a/gitlab/v4/cli.py +++ b/gitlab/v4/cli.py @@ -27,7 +27,7 @@ import gitlab.v4.objects from gitlab import cli -class GitlabCLI(object): +class GitlabCLI: def __init__( self, gl: gitlab.Gitlab, what: str, action: str, args: Dict[str, str] ) -> None: @@ -359,7 +359,7 @@ def get_dict( return obj.attributes -class JSONPrinter(object): +class JSONPrinter: def display(self, d: Union[str, Dict[str, Any]], **kwargs: Any) -> None: import json # noqa @@ -376,7 +376,7 @@ class JSONPrinter(object): print(json.dumps([get_dict(obj, fields) for obj in data])) -class YAMLPrinter(object): +class YAMLPrinter: def display(self, d: Union[str, Dict[str, Any]], **kwargs: Any) -> None: try: import yaml # noqa @@ -411,7 +411,7 @@ class YAMLPrinter(object): ) -class LegacyPrinter(object): +class LegacyPrinter: def display(self, d: Union[str, Dict[str, Any]], **kwargs: Any) -> None: verbose = kwargs.get("verbose", False) padding = kwargs.get("padding", 0) |