fix(python) Do not duplicate "Throw" annotations (#142)

* Fixed Python docstring duplicate throw parsing error
* ref(python): remove unecessary recursive
* Stylua

---------

Co-authored-by: danymat <d.danymat@gmail.com>
This commit is contained in:
Colin Kennedy
2023-05-31 03:50:53 -07:00
committed by GitHub
parent de603d2f83
commit e449d5b7ff

View File

@@ -15,7 +15,6 @@ local parent = {
return { return {
-- Search for these nodes -- Search for these nodes
parent = parent, parent = parent,
-- Traverse down these nodes and extract the information as necessary -- Traverse down these nodes and extract the information as necessary
data = { data = {
func = { func = {
@@ -84,10 +83,16 @@ return {
subtree = { subtree = {
{ {
retrieve = "first", retrieve = "first",
node_type = "identifier", node_type = "call",
recursive = true, recursive = true,
subtree = {
{
retrieve = "first",
node_type = "identifier",
extract = true, extract = true,
as = i.Throw, as = i.Throw,
}
}
}, },
}, },
}, },
@@ -258,12 +263,10 @@ return {
}, },
}, },
}, },
-- Use default granulator and generator -- Use default granulator and generator
locator = nil, locator = nil,
granulator = nil, granulator = nil,
generator = nil, generator = nil,
template = template template = template
:config({ :config({
append = { position = "after", child_name = "comment", fallback = "block", disabled = { "file" } }, append = { position = "after", child_name = "comment", fallback = "block", disabled = { "file" } },