MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / findHeadersAndFiles

Function findHeadersAndFiles

scripts/fix_headers.py:139–167  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

137
138
139def findHeadersAndFiles():
140 for root, dirs, files in os.walk(".", topdown=True):
141 for dir in list(dirs):
142 if dir.startswith("."):
143 dirs.remove(dir)
144 for excluded in ["developer.github.com", "build", "venv", "PyGithub.egg-info", "requirements", "pre-commit"]:
145 if excluded in dirs:
146 dirs.remove(excluded)
147
148 for filename in files:
149 fullname = os.path.join(root, filename)
150 if filename == "GithubCredentials.py":
151 pass
152 elif filename.endswith(".py"):
153 yield (PythonHeader(), fullname)
154 elif filename in ["COPYING", "COPYING.LESSER", "MAINTAINERS"]:
155 pass
156 elif filename.endswith(".rst") or filename.endswith(".md"):
157 pass
158 elif filename == ".gitignore":
159 yield (StandardHeader(), fullname)
160 elif "ReplayData" in fullname:
161 pass
162 elif fullname.endswith(".pyi"):
163 pass
164 elif fullname.endswith(".pyc"):
165 pass
166 else:
167 print(f"Don't know what to do with {filename} in {root}")
168
169
170def main():

Callers 1

mainFunction · 0.85

Calls 2

PythonHeaderClass · 0.85
StandardHeaderClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…