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

Class FileLikeStub

tests/GitRelease.py:58–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56
57
58class FileLikeStub:
59 def __init__(self):
60 self.dat = b"I wanted to come up with some clever phrase or something here to test with but my mind is blank."
61 self.file_length = len(self.dat)
62 self.index = 0
63
64 def read(self, size=-1):
65 if size < 0 or size is None:
66 start = self.index
67 self.index = self.file_length
68 return self.dat[start:]
69 else:
70 start = self.index
71 end = start + size
72 self.index = end
73 return self.dat[start:end]
74
75
76repo_name = "RepoTest"

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…