Skip to content

Commit

Permalink
minor changes to format docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
v-aparna committed Mar 9, 2023
1 parent cd558e5 commit 5237c81
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion examples/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ def text_print():
return "hello"

ops = Operations()

print(ops.add.__doc__)
print(div_unhandled.__doc__)

start_http_server(8080)
while True:
ops.div_handled(2, 0)
Expand All @@ -42,4 +46,4 @@ def text_print():
ops.add(1, 2)
time.sleep(2)
div_unhandled(2, 0)
print("server can still run")

3 changes: 2 additions & 1 deletion src/autometrics/autometrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def get_filename_as_module(func):
def write_docs(func_name, module_name):
g = Generator(func_name, module_name)
urls = g.createURLs()
docs = f"Prometheus Query URLs : \n"
docs = f"Prometheus Query URLs for Function - {func_name} and Module - {module_name}: \n\n"
for key, value in urls.items():
docs = f"{docs}{key} : {value} \n\n"
docs = f"{docs}-------------------------------------------\n"
return docs

0 comments on commit 5237c81

Please sign in to comment.