Skip to content

Commit

Permalink
Improve types in polyglot_piranha.pyi (#674)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanheule authored Jun 29, 2024
1 parent 14d134f commit fbc1039
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions polyglot_piranha.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# express or implied. See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import annotations
from typing import List, Optional

def execute_piranha(piranha_argument: PiranhaArguments) -> list[PiranhaOutputSummary]:
Expand All @@ -35,7 +36,7 @@ class PiranhaArguments:
paths_to_codebase: Optional[List[str]] = None,
include: Optional[List[str]] = None,
exclude: Optional[List[str]] = None,
substitutions: Optional[dict] = None,
substitutions: Optional[dict[str, str]] = None,
path_to_configurations: Optional[str] = None,
rule_graph: Optional[RuleGraph] = None,
code_snippet: Optional[str] = None,
Expand Down Expand Up @@ -141,7 +142,7 @@ class Match:
range: Range
"Range of the entire AST node captured by the match"

matches: dict
matches: dict[str, str]
"The mapping between tags and string representation of the AST captured"
""

Expand Down Expand Up @@ -289,7 +290,7 @@ class RuleGraph:
"The rules in the graph"
edges: list[OutgoingEdges]
"The edges in the graph"
graph: dict
graph: dict[str, list[tuple[str, str]]]
"The graph itself (as an adjacency list)"

def __init__(
Expand Down

0 comments on commit fbc1039

Please sign in to comment.