Added parse rule for exceptions from a module (#168)

This commit is contained in:
Colin Kennedy
2024-03-23 07:22:10 +00:00
committed by GitHub
parent b95347a588
commit 0daffcec24
3 changed files with 26 additions and 2 deletions

View File

@@ -202,6 +202,26 @@ return {
},
},
},
{
retrieve = "all",
node_type = "raise_statement",
recursive = true,
subtree = {
{
retrieve = "first",
node_type = "call",
recursive = true,
subtree = {
{
retrieve = "first",
node_type = "attribute",
extract = true,
as = i.Throw,
}
}
},
},
},
},
},
{

View File

@@ -241,6 +241,8 @@ end
---
--- Note: We will only document `major` and `minor` versions, not `patch` ones. (only X and Y in X.Y.z)
---
--- ## 2.17.1~
--- - Python raises now supports `raise foo.Bar()` syntax
--- ## 2.17.0~
--- - Python now supports dataclass attributes (#126)
--- ## 2.16.0~
@@ -303,7 +305,7 @@ end
--- with multiple annotation conventions.
---@tag neogen-changelog
---@toc_entry Changes in neogen plugin
neogen.version = "2.17.0"
neogen.version = "2.17.1"
--minidoc_afterlines_end
return neogen