diff --git a/packages/syft/src/syft/service/policy/policy.py b/packages/syft/src/syft/service/policy/policy.py index e4800f04d6e..3ac30e71089 100644 --- a/packages/syft/src/syft/service/policy/policy.py +++ b/packages/syft/src/syft/service/policy/policy.py @@ -896,12 +896,11 @@ def new_getfile(object: Any) -> Any: # TODO: fix the mypy issue and object.__qualname__ + "." + member.__name__ == member.__qualname__ ): return inspect.getfile(member) - else: - raise TypeError(f"Source for {object!r} not found") + raise TypeError(f"Source for {object!r} not found") def get_code_from_class(policy: type[CustomPolicy]) -> str: - klasses = [inspect.getmro(policy)[0]] # + klasses = [inspect.getmro(policy)[0]] whole_str = "" for klass in klasses: if is_interpreter_jupyter():