Skip to content

Commit

Permalink
[652] Fix types.
Browse files Browse the repository at this point in the history
  • Loading branch information
aravij committed Nov 20, 2020
1 parent 887cec7 commit af9d2c6
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Callable, Dict, List, Optional, NamedTuple, Union

from veniq.ast_framework import ASTNode, ASTNodeType
from ..ast_node import ASTNode
from ..ast_node_type import ASTNodeType
from .constants import BlockReason


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import Callable, Union
from networkx import DiGraph, dfs_labeled_edges
from networkx import DiGraph, dfs_labeled_edges # type: ignore

from .statement import Statement
from .block import Block
Expand Down
4 changes: 2 additions & 2 deletions aibolit/ast_framework/block_statement_graph/block.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from networkx import DiGraph
from networkx import DiGraph # type: ignore
from typing import Any, Callable, Iterator, Optional, TYPE_CHECKING

from veniq.ast_framework import ASTNode
from ..ast_node import ASTNode
from .constants import BLOCK_REASON, ORIGIN_STATEMENT, NODE, BlockReason, NodeId

if TYPE_CHECKING:
Expand Down
5 changes: 3 additions & 2 deletions aibolit/ast_framework/block_statement_graph/builder.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from typing import Dict, TYPE_CHECKING
from networkx import DiGraph
from networkx import DiGraph # type: ignore

from veniq.ast_framework import AST, ASTNode
from ..ast import AST
from ..ast_node import ASTNode
from .constants import NODE, BLOCK_REASON, ORIGIN_STATEMENT, NodeId
from ._nodes_factory import NodesFactory
from ._block_extractors import BlockInfo, extract_blocks_from_statement
Expand Down
4 changes: 2 additions & 2 deletions aibolit/ast_framework/block_statement_graph/statement.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from networkx import DiGraph
from networkx import DiGraph # type: ignore
from typing import Callable, Iterator, Any, TYPE_CHECKING

from veniq.ast_framework import ASTNode
from ..ast_node import ASTNode
from .constants import NODE, NodeId

if TYPE_CHECKING:
Expand Down
8 changes: 4 additions & 4 deletions test/ast_framework/test_block_statement_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
from pathlib import Path
from unittest import TestCase

from veniq.ast_framework.block_statement_graph import build_block_statement_graph, Block, Statement
from veniq.ast_framework.block_statement_graph.constants import BlockReason
from veniq.ast_framework import AST, ASTNodeType
from veniq.utils.ast_builder import build_ast
from aibolit.ast_framework.block_statement_graph import build_block_statement_graph, Block, Statement
from aibolit.ast_framework.block_statement_graph.constants import BlockReason
from aibolit.ast_framework import AST, ASTNodeType
from aibolit.utils.ast_builder import build_ast


class BlockStatementTestCase(TestCase):
Expand Down

0 comments on commit af9d2c6

Please sign in to comment.