MCPcopy Index your code
hub / github.com/python/cpython / _handle_rest

Method _handle_rest

Lib/configparser.py:1112–1124  ·  view source on GitHub ↗
(self, st, line, fpname)

Source from the content-addressed store, hash-verified

1110 return is_continue
1111
1112 def _handle_rest(self, st, line, fpname):
1113 # a section header or option header?
1114 if self._allow_unnamed_section and st.cursect is None:
1115 self._handle_header(st, UNNAMED_SECTION, fpname)
1116
1117 st.indent_level = st.cur_indent_level
1118 # is it a section header?
1119 mo = self.SECTCRE.match(line.clean)
1120
1121 if not mo and st.cursect is None:
1122 raise MissingSectionHeaderError(fpname, st.lineno, line)
1123
1124 self._handle_header(st, mo.group('header'), fpname) if mo else self._handle_option(st, line, fpname)
1125
1126 def _handle_header(self, st, sectname, fpname):
1127 st.sectname = sectname

Callers 1

_read_innerMethod · 0.95

Calls 5

_handle_headerMethod · 0.95
_handle_optionMethod · 0.95
matchMethod · 0.45
groupMethod · 0.45

Tested by

no test coverage detected