Skip to content
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

Check of create_using type in __prep_create_using #1395

Closed
AlexanderVNikitin opened this issue Mar 6, 2015 · 2 comments
Closed

Check of create_using type in __prep_create_using #1395

AlexanderVNikitin opened this issue Mar 6, 2015 · 2 comments

Comments

@AlexanderVNikitin
Copy link
Contributor

In this code part we make a conclusion of type based on having clear() method.

    try:
        create_using.clear()
    except:
        raise TypeError("Input graph is not a networkx graph type")

It can lead to some bugs in future.
It would be better to check up type with some other ways. For example, by inspect module.

What do you think about it?

@AlexanderVNikitin AlexanderVNikitin changed the title Bug in __prep_create_using Check if create_using type in __prep_create_using Mar 6, 2015
@AlexanderVNikitin AlexanderVNikitin changed the title Check if create_using type in __prep_create_using Check of create_using type in __prep_create_using Mar 6, 2015
@hagberg
Copy link
Member

hagberg commented Mar 24, 2015

I usually advocate to remove the create_using() idiom here - #1393 etc.
But I don't have consensus on a replacement plan yet.

@hagberg
Copy link
Member

hagberg commented Dec 27, 2015

continue at #1393

@hagberg hagberg closed this as completed Dec 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants