Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.9/dist-packages/scipy/io/arff/arffread.py: 70%

10 statements  

« prev     ^ index     » next       coverage.py v7.3.1, created at 2023-09-23 06:43 +0000

1# This file is not meant for public use and will be removed in SciPy v2.0.0. 

2# Use the `scipy.io.arff` namespace for importing the functions 

3# included below. 

4 

5import warnings 

6from . import _arffread 

7 

8__all__ = [ # noqa: F822 

9 'MetaData', 'loadarff', 'ArffError', 'ParseArffError', 

10 'r_meta', 'r_comment', 'r_empty', 'r_headerline', 

11 'r_datameta', 'r_relation', 'r_attribute', 'r_nominal', 

12 'r_date', 'r_comattrval', 'r_wcomattrval', 'Attribute', 

13 'NominalAttribute', 'NumericAttribute', 'StringAttribute', 

14 'DateAttribute', 'RelationalAttribute', 'to_attribute', 

15 'csv_sniffer_has_bug_last_field', 'workaround_csv_sniffer_bug_last_field', 

16 'split_data_line', 'tokenize_attribute', 'tokenize_single_comma', 

17 'tokenize_single_wcomma', 'read_relational_attribute', 'read_header', 

18 'basic_stats', 'print_attribute', 'test_weka' 

19] 

20 

21 

22def __dir__(): 

23 return __all__ 

24 

25 

26def __getattr__(name): 

27 if name not in __all__: 

28 raise AttributeError( 

29 "scipy.io.arff.arffread is deprecated and has no attribute " 

30 f"{name}. Try looking in scipy.io.arff instead.") 

31 

32 warnings.warn(f"Please use `{name}` from the `scipy.io.arff` namespace, " 

33 "the `scipy.io.arff.arffread` namespace is deprecated.", 

34 category=DeprecationWarning, stacklevel=2) 

35 

36 return getattr(_arffread, name)