Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _get_needs_for_ctor(self, cls):
try:
return get_type_hints(cls.__init__, None, self._localns)
except NameError as e:
raise InvalidForwardReferenceException(str(e))