Skip to content

Commit

Permalink
Fix docstring parsing for python3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
CravateRouge committed Dec 26, 2024
1 parent 9fa9c8d commit d77d8c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bloodyAD/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def main():
for function_name, function in inspect.getmembers(
submodule, inspect.isfunction
):
function_doc, params_doc = doc_parser(function.__doc__)
function_doc, params_doc = doc_parser(inspect.getdoc(function))
# This formatter class prints default values
subsubparser = subsubparsers.add_parser(
function_name,
Expand Down Expand Up @@ -229,7 +229,7 @@ def main():
# (other part of the string, one parameter description per line, starting with :param param_name:)
def doc_parser(doc):
doc_parsed = doc.splitlines()
return doc_parsed[1], doc_parsed[3:-1]
return doc_parsed[0], doc_parsed[2:]


def print_entry(entryname, entry):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "bloodyAD"
authors = [
{ name="CravateRouge", email="baptiste@cravaterouge.com" },
]
version = "2.1.5"
version = "2.1.7"
description = "AD Privesc Swiss Army Knife"
readme = "README.md"
requires-python = ">=3.8"
Expand Down

0 comments on commit d77d8c0

Please sign in to comment.