MCPcopy Index your code
hub / github.com/RustPython/RustPython / read

Method read

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

Source from the content-addressed store, hash-verified

109
110 @staticmethod
111 def read(text, filter_=None):
112 lines = filter(filter_, map(str.strip, text.splitlines()))
113 name = None
114 for value in lines:
115 section_match = value.startswith('[') and value.endswith(']')
116 if section_match:
117 name = value.strip('[]')
118 continue
119 yield Pair(name, value)
120
121 @staticmethod
122 def valid(line: str):

Callers 6

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

Calls 6

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

Tested by

no test coverage detected