Skip to content

Fixing lgtm issue in basic graphs #1141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Aug 20, 2019
2 changes: 1 addition & 1 deletion graphs/basic_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def dijk(G, s):
from collections import deque


def topo(G, ind=None, Q=[1]):
def topo(G, ind=None, Q):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Travis CI tests are failing. A proper workaround would be:

def topo(G, ind=None, Q=None):
    if Q is None:
        Q = [1]

if ind is None:
ind = [0] * (len(G) + 1) # SInce oth Index is ignored
for u in G:
Expand Down