Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/networkx/__init__.py: 97%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

31 statements  

1""" 

2NetworkX 

3======== 

4 

5NetworkX is a Python package for the creation, manipulation, and study of the 

6structure, dynamics, and functions of complex networks. 

7 

8See https://networkx.org for complete documentation. 

9""" 

10 

11__version__ = "3.5.1rc0.dev0" 

12 

13 

14# These are imported in order as listed 

15from networkx.lazy_imports import _lazy_import 

16 

17from networkx.exception import * 

18 

19from networkx import utils 

20from networkx.utils import _clear_cache, _dispatchable 

21 

22# load_and_call entry_points, set configs 

23config = utils.backends._set_configs_from_environment() 

24utils.config = utils.configs.config = config # type: ignore[attr-defined] 

25 

26from networkx import classes 

27from networkx.classes import filters 

28from networkx.classes import * 

29 

30from networkx import convert 

31from networkx.convert import * 

32 

33from networkx import convert_matrix 

34from networkx.convert_matrix import * 

35 

36from networkx import relabel 

37from networkx.relabel import * 

38 

39from networkx import generators 

40from networkx.generators import * 

41 

42from networkx import readwrite 

43from networkx.readwrite import * 

44 

45# Need to test with SciPy, when available 

46from networkx import algorithms 

47from networkx.algorithms import * 

48 

49from networkx import linalg 

50from networkx.linalg import * 

51 

52from networkx import drawing 

53from networkx.drawing import * 

54 

55 

56def __getattr__(name): 

57 if name == "random_tree": 

58 raise AttributeError( 

59 "nx.random_tree was removed in version 3.4. Use `nx.random_labeled_tree` instead.\n" 

60 "See: https://networkx.org/documentation/latest/release/release_3.4.html" 

61 ) 

62 raise AttributeError(f"module 'networkx' has no attribute '{name}'")