summaryrefslogtreecommitdiff
path: root/gitlab/v4/cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab/v4/cli.py')
-rw-r--r--gitlab/v4/cli.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/gitlab/v4/cli.py b/gitlab/v4/cli.py
index c4e15fc..3339a5a 100644
--- a/gitlab/v4/cli.py
+++ b/gitlab/v4/cli.py
@@ -371,13 +371,14 @@ def get_dict(
class JSONPrinter:
- def display(self, d: Union[str, Dict[str, Any]], **kwargs: Any) -> None:
+ @staticmethod
+ def display(d: Union[str, Dict[str, Any]], **kwargs: Any) -> None:
import json # noqa
print(json.dumps(d))
+ @staticmethod
def display_list(
- self,
data: List[Union[str, gitlab.base.RESTObject]],
fields: List[str],
**kwargs: Any,
@@ -388,7 +389,8 @@ class JSONPrinter:
class YAMLPrinter:
- def display(self, d: Union[str, Dict[str, Any]], **kwargs: Any) -> None:
+ @staticmethod
+ def display(d: Union[str, Dict[str, Any]], **kwargs: Any) -> None:
try:
import yaml # noqa
@@ -400,8 +402,8 @@ class YAMLPrinter:
"to use the yaml output feature"
)
+ @staticmethod
def display_list(
- self,
data: List[Union[str, gitlab.base.RESTObject]],
fields: List[str],
**kwargs: Any,