MCPcopy Create free account
hub / github.com/awslabs/gap-text2sql / __exit__

Method __exit__

rat-sql-gap/seq2struct/utils/random_state.py:54–61  ·  view source on GitHub ↗
(self, exception_type, exception_value, traceback)

Source from the content-addressed store, hash-verified

52 self._active = True
53
54 def __exit__(self, exception_type, exception_value, traceback):
55 # Save current state of RNG
56 self.inside_state = RandomState()
57 # Restore state of RNG saved in __enter__
58 self.outside_state.restore()
59 self.outside_state = None
60
61 self._active = False

Callers

nothing calls this directly

Calls 2

RandomStateClass · 0.85
restoreMethod · 0.45

Tested by

no test coverage detected