Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
eendebakpt committed Jan 12, 2025
1 parent ce68ccc commit cbb565c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Lib/configparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ def __init__(self):
self.errors = list()


class Line(object):
class _Line(object):

def __init__(self, value, prefixes, matcher ):
self.value = value
Expand All @@ -585,7 +585,7 @@ def has_comments(self):
return self.value.strip() != self.clean


class LineParser():
class _LineParser():
__slots__ =['prefixes', 'matcher']

def __init__(self, prefixes):
Expand All @@ -597,7 +597,7 @@ def __init__(self, prefixes):
)

def parse(self, value):
return Line(value, self.prefixes, self.matcher)
return _Line(value, self.prefixes, self.matcher)

class RawConfigParser(MutableMapping):
"""ConfigParser that does not do interpolation."""
Expand Down Expand Up @@ -1072,10 +1072,7 @@ def _read(self, fp, fpname):
def _read_inner(self, fp, fpname):
st = _ReadState()

line_parser = LineParser(self._prefixes)

# Line = functools.partial(_Line, prefixes=self._prefixes, matcher=line_parser.matcher)
#for st.lineno, line in enumerate(map(Line, fp), start=1):
line_parser = _LineParser(self._prefixes)
for st.lineno, line in enumerate(map(line_parser.parse, fp), start=1):
if not line.clean:
if self._empty_lines_in_values:
Expand Down

0 comments on commit cbb565c

Please sign in to comment.