diff options
author | Mridul Seth <seth.mridul@gmail.com> | 2022-06-15 21:42:15 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-15 20:42:15 +0300 |
commit | fb6221b1c5f341ae7a74b8a78be29c0320f264cf (patch) | |
tree | 01b172bbd6ed7cc6bd1c97c1cc5d5c53fdd3c075 /networkx/utils | |
parent | 192f5e15c7a6879d99ecfd107f07b2327582434d (diff) | |
download | networkx-fb6221b1c5f341ae7a74b8a78be29c0320f264cf.tar.gz |
Remove deprecated function is_string_like (#5738)
Diffstat (limited to 'networkx/utils')
-rw-r--r-- | networkx/utils/misc.py | 15 | ||||
-rw-r--r-- | networkx/utils/tests/test_misc.py | 7 |
2 files changed, 0 insertions, 22 deletions
diff --git a/networkx/utils/misc.py b/networkx/utils/misc.py index a0e88c0c..7b55ca31 100644 --- a/networkx/utils/misc.py +++ b/networkx/utils/misc.py @@ -23,7 +23,6 @@ import networkx as nx np = nx.lazy_import("numpy") __all__ = [ - "is_string_like", "iterable", "empty_generator", "flatten", @@ -55,20 +54,6 @@ __all__ = [ # see G.add_nodes and others in Graph Class in networkx/base.py -def is_string_like(obj): # from John Hunter, types-free version - """Check if obj is string. - - .. deprecated:: 2.6 - This is deprecated and will be removed in NetworkX v3.0. - """ - msg = ( - "is_string_like is deprecated and will be removed in 3.0." - "Use isinstance(obj, str) instead." - ) - warnings.warn(msg, DeprecationWarning) - return isinstance(obj, str) - - def iterable(obj): """Return True if obj is iterable with a well-defined len(). diff --git a/networkx/utils/tests/test_misc.py b/networkx/utils/tests/test_misc.py index b886852d..96ab5452 100644 --- a/networkx/utils/tests/test_misc.py +++ b/networkx/utils/tests/test_misc.py @@ -13,7 +13,6 @@ from networkx.utils import ( discrete_sequence, flatten, groups, - is_string_like, iterable, make_list_of_ints, make_str, @@ -62,12 +61,6 @@ def test_flatten(nested, result): assert issubclass(type(val), tuple) -def test_is_string_like(): - assert is_string_like("aaaa") - assert not is_string_like(None) - assert not is_string_like(123) - - def test_iterable(): assert not iterable(None) assert not iterable(10) |