Skip to content

Commit

Permalink
add neighbors to the internal graph repr
Browse files Browse the repository at this point in the history
  • Loading branch information
kavigupta committed Jan 7, 2020
1 parent 5c7b054 commit 3351f04
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ast_scope/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ def nodes(self):

def edges(self):
return list((source, target) for source, targets in self.__adjacency_list.items() for target in targets)

def neighbors(self, node):
return list(self.__adjacency_list[node])
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

setuptools.setup(
name="ast_scope", # Replace with your own username
version="0.3.0",
version="0.3.1",
author="Kavi Gupta",
author_email="[email protected]",
description="Annotates a Python AST with the scope of symbols.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/kavigupta/ast_scope",
download_url="https://github.com/kavigupta/ast_scope/archive/0.3.0.zip",
download_url="https://github.com/kavigupta/ast_scope/archive/0.3.1.zip",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3.5",
Expand Down

0 comments on commit 3351f04

Please sign in to comment.