From 80aadaf4262016a8181b5150ca7e17c8139c15fa Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Fri, 3 Jun 2022 16:40:43 -0700 Subject: chore: enable pylint check: "no-self-use" Enable the pylint check "no-self-use" and fix the errors detected. --- gitlab/v4/cli.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'gitlab/v4/cli.py') 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, -- cgit v1.2.1