Skip to content

Commit

Permalink
Merge pull request #2052 from python-gitlab/jlvillal/cli_minor_clean
Browse files Browse the repository at this point in the history
chore: rename `__call__()` to `run()` in GitlabCLI
  • Loading branch information
nejch committed Jun 4, 2022
2 parents 9ab3c10 + 6189437 commit 4eb5bad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gitlab/v4/cli.py
Expand Up @@ -79,7 +79,7 @@ def _process_from_parent_attrs(self) -> None:
# If we don't delete it then it will be added to the URL as a query-string
del self.args[key]

def __call__(self) -> Any:
def run(self) -> Any:
# Check for a method that matches object + action
method = f"do_{self.what}_{self.action}"
if hasattr(self, method):
Expand Down Expand Up @@ -505,7 +505,7 @@ def run(
fields: List[str],
) -> None:
g_cli = GitlabCLI(gl=gl, what=what, action=action, args=args)
data = g_cli()
data = g_cli.run()

printer: Union[JSONPrinter, LegacyPrinter, YAMLPrinter] = PRINTERS[output]()

Expand Down

0 comments on commit 4eb5bad

Please sign in to comment.