File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 2222from pvlib .iotools .sodapro import get_cams # noqa: F401
2323from pvlib .iotools .sodapro import read_cams # noqa: F401
2424from pvlib .iotools .sodapro import parse_cams # noqa: F401
25- from pvlib .iotools .panond import read_panond , parse_panond
25+ from pvlib .iotools .panond import read_panond , parse_panond # noqa: F401
Original file line number Diff line number Diff line change 44
55import io
66
7- def num_type (value ):
8-
97
10- # Determine if a value is float, int or leave as string
8+ def num_type (value ):
9+ """
10+ Determine if a value is float, int or a string
11+ """
1112 if '.' in value :
1213 try : # Detect float
1314 value_out = float (value )
@@ -26,11 +27,12 @@ def num_type(value):
2627 except ValueError : # Otherwise leave as string
2728 value_out = value
2829 return value_out
29-
30+
3031
3132def element_type (element ):
32- # Determine if an element is a list then pass to num_type()
33-
33+ """
34+ Determine if an element is a list then pass to num_type()
35+ """
3436 if ',' in element : # Detect a list
3537 values = element .split (',' )
3638 element_out = []
@@ -86,11 +88,10 @@ def parse_panond(fbuf):
8688 indent_lvl_2 = (len (lines [i + 1 ]) - len (lines [i + 1 ].lstrip (' ' ))) // 2
8789 line_data = lines [i ].split ('=' )
8890 key = line_data [0 ].strip ()
89- # value = element_type(line_data[1].strip()) if len(line_data) > 1 else None
9091 if len (line_data ) > 1 :
9192 value = element_type (line_data [1 ].strip ())
9293 else :
93- value = element_type = None
94+ value = None
9495 # add a level to the dict. The key here will be ignored.
9596 # Not vital to file function.
9697 if indent_lvl_2 > indent_lvl_1 :
You can’t perform that action at this time.
0 commit comments