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

Method read

Lib/importlib/metadata/__init__.py:125–133  ·  view source on GitHub ↗
(text, filter_=None)

Source from the content-addressed store, hash-verified

123
124 @staticmethod
125 def read(text, filter_=None):
126 lines = filter(filter_, map(str.strip, text.splitlines()))
127 name = None
128 for value in lines:
129 section_match = value.startswith('[') and value.endswith(']')
130 if section_match:
131 name = value.strip('[]')
132 continue
133 yield Pair(name, value)
134
135 @staticmethod
136 def valid(line: str):

Callers 7

decode_sourceFunction · 0.45
get_dataMethod · 0.45
create_moduleMethod · 0.45
read_bytesMethod · 0.45
read_textMethod · 0.45
section_pairsMethod · 0.45

Calls 6

PairClass · 0.85
filterFunction · 0.50
splitlinesMethod · 0.45
startswithMethod · 0.45
endswithMethod · 0.45
stripMethod · 0.45

Tested by

no test coverage detected