-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: port code from
library-analyzer
(#16)
### Summary of Changes * Moved API and docstring parser functionality from Library-Analyzer to this project. * Removed astroid and added mypy for file parsing and adjusted the AST walker & visitor. * Adjusted docstring parsers to work with mypy. * Added snapshot testing for pytest. --------- Co-authored-by: Lars Reimann <[email protected]> Co-authored-by: megalinter-bot <[email protected]>
- Loading branch information
1 parent
0d8b701
commit 5e0b3b1
Showing
63 changed files
with
12,816 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ __pycache__/ | |
venv/ | ||
|
||
# Pytest outputs | ||
.mypy_cache/ | ||
.pytest_cache/ | ||
htmlcov/ | ||
.coverage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
"""Safe-DS stubs generator.""" | ||
from __future__ import annotations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
"""API-Analyzer for the Safe-DS stubs generator.""" | ||
from __future__ import annotations | ||
|
||
from ._api import API, Attribute, Class, Function, Parameter, ParameterAssignment | ||
from ._get_api import get_api | ||
from ._mypy_helpers import get_classdef_definitions, get_funcdef_definitions, get_mypyfile_definitions | ||
from ._package_metadata import distribution, distribution_version, package_root | ||
from ._types import ( | ||
AbstractType, | ||
BoundaryType, | ||
DictType, | ||
EnumType, | ||
FinalType, | ||
ListType, | ||
LiteralType, | ||
NamedType, | ||
OptionalType, | ||
SetType, | ||
TupleType, | ||
UnionType, | ||
) | ||
|
||
__all__ = [ | ||
"AbstractType", | ||
"API", | ||
"Attribute", | ||
"BoundaryType", | ||
"Class", | ||
"DictType", | ||
"distribution", | ||
"distribution_version", | ||
"EnumType", | ||
"FinalType", | ||
"Function", | ||
"get_api", | ||
"get_classdef_definitions", | ||
"get_funcdef_definitions", | ||
"get_mypyfile_definitions", | ||
"ListType", | ||
"LiteralType", | ||
"NamedType", | ||
"OptionalType", | ||
"package_root", | ||
"Parameter", | ||
"ParameterAssignment", | ||
"SetType", | ||
"TupleType", | ||
"UnionType", | ||
] |
Oops, something went wrong.