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

Class Zap

Lib/test/test_genericalias.py:249–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247 def test_evil_repr1(self):
248 # gh-143635
249 class Zap:
250 def __init__(self, container):
251 self.container = container
252 def __getattr__(self, name):
253 if name == "__origin__":
254 self.container.clear()
255 return None
256 if name == "__args__":
257 return ()
258 raise AttributeError
259
260 params = []
261 params.append(Zap(params))

Callers 2

test_evil_repr1Method · 0.85
test_evil_repr2Method · 0.85

Calls

no outgoing calls

Tested by 2

test_evil_repr1Method · 0.68
test_evil_repr2Method · 0.68