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

Function _iter_ignored

Tools/c-analyzer/c_analyzer/datafiles.py:96–114  ·  view source on GitHub ↗
(infile, relroot)

Source from the content-addressed store, hash-verified

94
95
96def _iter_ignored(infile, relroot):
97 if relroot and relroot is not fsutil.USE_CWD:
98 relroot = os.path.abspath(relroot)
99 bogus = {_tables.EMPTY, _tables.UNKNOWN}
100 for row in _tables.read_table(infile, IGNORED_HEADER, sep='\t'):
101 *varidinfo, reason = row
102 if _tables.EMPTY in varidinfo or _tables.UNKNOWN in varidinfo:
103 varidinfo = tuple(None if v in bogus else v
104 for v in varidinfo)
105 if reason in bogus:
106 reason = None
107 try:
108 varid = _info.DeclID.from_row(varidinfo)
109 except BaseException as e:
110 e.add_note(f"Error occurred when processing row {varidinfo} in {infile}.")
111 e.add_note(f"Could it be that you added a row which is not tab-delimited?")
112 raise e
113 varid = varid.fix_filename(relroot, formatted=False, fixroot=False)
114 yield varid, reason
115
116
117def write_ignored(variables, outfile, relroot=fsutil.USE_CWD):

Callers 1

read_ignoredFunction · 0.85

Calls 3

abspathMethod · 0.45
from_rowMethod · 0.45
fix_filenameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…