(self, fp, fpname)
| 1072 | self._join_multiline_values() |
| 1073 | |
| 1074 | def _read_inner(self, fp, fpname): |
| 1075 | st = _ReadState() |
| 1076 | |
| 1077 | for st.lineno, line in enumerate(map(self._comments.wrap, fp), start=1): |
| 1078 | if not line.clean: |
| 1079 | if self._empty_lines_in_values: |
| 1080 | # add empty line to the value, but only if there was no |
| 1081 | # comment on the line |
| 1082 | if (not line.has_comments and |
| 1083 | st.cursect is not None and |
| 1084 | st.optname and |
| 1085 | st.cursect[st.optname] is not None): |
| 1086 | st.cursect[st.optname].append('') # newlines added at join |
| 1087 | else: |
| 1088 | # empty line marks end of value |
| 1089 | st.indent_level = sys.maxsize |
| 1090 | continue |
| 1091 | |
| 1092 | first_nonspace = self.NONSPACECRE.search(line) |
| 1093 | st.cur_indent_level = first_nonspace.start() if first_nonspace else 0 |
| 1094 | |
| 1095 | if self._handle_continuation_line(st, line, fpname): |
| 1096 | continue |
| 1097 | |
| 1098 | self._handle_rest(st, line, fpname) |
| 1099 | |
| 1100 | return st.errors |
| 1101 | |
| 1102 | def _handle_continuation_line(self, st, line, fpname): |
| 1103 | # continuation line? |
no test coverage detected