Skip to content

Commit

Permalink
Remove only :return:
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Nov 20, 2019
1 parent 6339962 commit 8b639b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/rest_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import argparse
import inspect
import json
import re
import logging
import sys
from pathlib import Path
Expand Down Expand Up @@ -238,7 +239,8 @@ def print_commands():
print("Possible commands:\n")
for x, y in inspect.getmembers(client):
if not x.startswith('_'):
print(f"{x}""\n "f"{getattr(client, x).__doc__.splitlines()[0]}""\n")
doc = re.sub(':return:.*', '', getattr(client, x).__doc__, flags=re.MULTILINE).rstrip()
print(f"{x}\n\t{doc}\n")


def main(args):
Expand Down

0 comments on commit 8b639b5

Please sign in to comment.