Skip to content

Commit

Permalink
chore: rename __call__() to run() in GitlabCLI
Browse files Browse the repository at this point in the history
Less confusing to have it be a normal method.
  • Loading branch information
JohnVillalovos committed Jun 4, 2022
1 parent 00aec96 commit 6189437
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 6189437

Please sign in to comment.